aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2010-05-19 11:55:40 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-05-19 11:55:40 -0400
commitd6ce171069635f05737935adc813b4d48d71a583 (patch)
treeb0356df55a3d86cf9f5074ea926294fd3a206607 /fs/jffs2
parent0717bf8411bb673dd2369aaa096f7396446b38f5 (diff)
jffs2: Wake GC thread when there are blocks to be erased
Now that we trigger block erases from jffs2_garbage_collect_pass(), adjust jffs2_thread_should_wake() to return 1 when there are blocks to erase. Signed-off-by: Joakim Tjernlund <joakim.tjernlund@transmode.se> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs/jffs2')
-rw-r--r--fs/jffs2/nodemgmt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
index 08e2c69fc147..5ab5c8521cdf 100644
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -744,6 +744,10 @@ int jffs2_thread_should_wake(struct jffs2_sb_info *c)
744 int nr_very_dirty = 0; 744 int nr_very_dirty = 0;
745 struct jffs2_eraseblock *jeb; 745 struct jffs2_eraseblock *jeb;
746 746
747 if (!list_empty(&c->erase_complete_list) ||
748 !list_empty(&c->erase_pending_list))
749 return 1;
750
747 if (c->unchecked_size) { 751 if (c->unchecked_size) {
748 D1(printk(KERN_DEBUG "jffs2_thread_should_wake(): unchecked_size %d, checked_ino #%d\n", 752 D1(printk(KERN_DEBUG "jffs2_thread_should_wake(): unchecked_size %d, checked_ino #%d\n",
749 c->unchecked_size, c->checked_ino)); 753 c->unchecked_size, c->checked_ino));