]> err.no Git - linux-2.6/blobdiff - fs/jffs2/nodemgmt.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
[linux-2.6] / fs / jffs2 / nodemgmt.c
index 747a73f0aa4d3b8dcf25dfec74fd4a1631fb4a0d..9df8f3ef20dfd8d8a39d59ee02d4e14ea2713927 100644 (file)
@@ -116,7 +116,10 @@ int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
                        spin_unlock(&c->erase_completion_lock);
 
                        ret = jffs2_garbage_collect_pass(c);
-                       if (ret)
+
+                       if (ret == -EAGAIN)
+                               jffs2_erase_pending_blocks(c, 1);
+                       else if (ret)
                                return ret;
 
                        cond_resched();