diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-05-19 12:05:14 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-05-19 12:10:44 -0400 |
commit | ae3b6ba06c8ed399ef920724ee8136e540878294 (patch) | |
tree | 427f89ac31defa7b3114c50ab706c0f6df539136 /fs/jffs2/erase.c | |
parent | acb64a43e4503fbea9faf123f2403da7af8831eb (diff) |
jffs2: Use jffs2_garbage_collect_trigger() to trigger pending erases
This is now done in a GC pass; we don't need to trigger kupdated to do it.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs/jffs2/erase.c')
-rw-r--r-- | fs/jffs2/erase.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c index 563c857ca544..6286ad9b00f7 100644 --- a/fs/jffs2/erase.c +++ b/fs/jffs2/erase.c | |||
@@ -168,10 +168,10 @@ static void jffs2_erase_succeeded(struct jffs2_sb_info *c, struct jffs2_eraseblo | |||
168 | mutex_lock(&c->erase_free_sem); | 168 | mutex_lock(&c->erase_free_sem); |
169 | spin_lock(&c->erase_completion_lock); | 169 | spin_lock(&c->erase_completion_lock); |
170 | list_move_tail(&jeb->list, &c->erase_complete_list); | 170 | list_move_tail(&jeb->list, &c->erase_complete_list); |
171 | /* Wake the GC thread to mark them clean */ | ||
172 | jffs2_garbage_collect_trigger(c); | ||
171 | spin_unlock(&c->erase_completion_lock); | 173 | spin_unlock(&c->erase_completion_lock); |
172 | mutex_unlock(&c->erase_free_sem); | 174 | mutex_unlock(&c->erase_free_sem); |
173 | /* Ensure that kupdated calls us again to mark them clean */ | ||
174 | jffs2_erase_pending_trigger(c); | ||
175 | wake_up(&c->erase_wait); | 175 | wake_up(&c->erase_wait); |
176 | } | 176 | } |
177 | 177 | ||
@@ -491,9 +491,9 @@ filebad: | |||
491 | 491 | ||
492 | refile: | 492 | refile: |
493 | /* Stick it back on the list from whence it came and come back later */ | 493 | /* Stick it back on the list from whence it came and come back later */ |
494 | jffs2_erase_pending_trigger(c); | ||
495 | mutex_lock(&c->erase_free_sem); | 494 | mutex_lock(&c->erase_free_sem); |
496 | spin_lock(&c->erase_completion_lock); | 495 | spin_lock(&c->erase_completion_lock); |
496 | jffs2_garbage_collect_trigger(c); | ||
497 | list_move(&jeb->list, &c->erase_complete_list); | 497 | list_move(&jeb->list, &c->erase_complete_list); |
498 | spin_unlock(&c->erase_completion_lock); | 498 | spin_unlock(&c->erase_completion_lock); |
499 | mutex_unlock(&c->erase_free_sem); | 499 | mutex_unlock(&c->erase_free_sem); |