diff options
Diffstat (limited to 'fs/jffs2')
-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 61ae001eced5..44fa7379098f 100644 --- a/fs/jffs2/gc.c +++ b/fs/jffs2/gc.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * For licensing information, see the file 'LICENCE' in this directory. | 8 | * For licensing information, see the file 'LICENCE' in this directory. |
9 | * | 9 | * |
10 | * $Id: gc.c,v 1.145 2005/02/09 09:09:01 pavlov Exp $ | 10 | * $Id: gc.c,v 1.146 2005/03/20 17:45:25 dedekind Exp $ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
@@ -50,6 +50,7 @@ static struct jffs2_eraseblock *jffs2_find_gc_block(struct jffs2_sb_info *c) | |||
50 | put the clever wear-levelling algorithms. Eventually. */ | 50 | put the clever wear-levelling algorithms. Eventually. */ |
51 | /* We possibly want to favour the dirtier blocks more when the | 51 | /* We possibly want to favour the dirtier blocks more when the |
52 | number of free blocks is low. */ | 52 | number of free blocks is low. */ |
53 | again: | ||
53 | if (!list_empty(&c->bad_used_list) && c->nr_free_blocks > c->resv_blocks_gcbad) { | 54 | if (!list_empty(&c->bad_used_list) && c->nr_free_blocks > c->resv_blocks_gcbad) { |
54 | D1(printk(KERN_DEBUG "Picking block from bad_used_list to GC next\n")); | 55 | D1(printk(KERN_DEBUG "Picking block from bad_used_list to GC next\n")); |
55 | nextlist = &c->bad_used_list; | 56 | nextlist = &c->bad_used_list; |
@@ -79,6 +80,11 @@ static struct jffs2_eraseblock *jffs2_find_gc_block(struct jffs2_sb_info *c) | |||
79 | D1(printk(KERN_DEBUG "Picking block from erasable_list to GC next (clean_list and {very_,}dirty_list were empty)\n")); | 80 | D1(printk(KERN_DEBUG "Picking block from erasable_list to GC next (clean_list and {very_,}dirty_list were empty)\n")); |
80 | 81 | ||
81 | nextlist = &c->erasable_list; | 82 | nextlist = &c->erasable_list; |
83 | } else if (!list_empty(&c->erasable_pending_wbuf_list)) { | ||
84 | /* There are blocks are wating for the wbuf sync */ | ||
85 | D1(printk(KERN_DEBUG "Synching wbuf in order to reuse erasable_pending_wbuf_list blocks\n")); | ||
86 | jffs2_flush_wbuf_pad(c); | ||
87 | goto again; | ||
82 | } else { | 88 | } else { |
83 | /* Eep. All were empty */ | 89 | /* Eep. All were empty */ |
84 | D1(printk(KERN_NOTICE "jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they all?\n")); | 90 | D1(printk(KERN_NOTICE "jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they all?\n")); |