diff options
Diffstat (limited to 'fs/jffs2/gc.c')
-rw-r--r-- | fs/jffs2/gc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c index 26c7992c45ca..bad005664e30 100644 --- a/fs/jffs2/gc.c +++ b/fs/jffs2/gc.c | |||
@@ -221,7 +221,13 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) | |||
221 | jeb = jffs2_find_gc_block(c); | 221 | jeb = jffs2_find_gc_block(c); |
222 | 222 | ||
223 | if (!jeb) { | 223 | if (!jeb) { |
224 | D1 (printk(KERN_NOTICE "jffs2: Couldn't find erase block to garbage collect!\n")); | 224 | /* Couldn't find a free block. But maybe we can just erase one and make 'progress'? */ |
225 | if (!list_empty(&c->erase_pending_list)) { | ||
226 | spin_unlock(&c->erase_completion_lock); | ||
227 | mutex_unlock(&c->alloc_sem); | ||
228 | return -EAGAIN; | ||
229 | } | ||
230 | D1(printk(KERN_NOTICE "jffs2: Couldn't find erase block to garbage collect!\n")); | ||
225 | spin_unlock(&c->erase_completion_lock); | 231 | spin_unlock(&c->erase_completion_lock); |
226 | mutex_unlock(&c->alloc_sem); | 232 | mutex_unlock(&c->alloc_sem); |
227 | return -EIO; | 233 | return -EIO; |