diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-05-19 17:00:10 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-05-19 17:10:22 +0100 |
commit | acb64a43e4503fbea9faf123f2403da7af8831eb (patch) | |
tree | 862d5ad6530b7c8671bda96a1bd1d07179f0b7c9 /fs/jffs2/super.c | |
parent | d6ce171069635f05737935adc813b4d48d71a583 (diff) |
jffs2: Require jffs2_garbage_collect_trigger() to be called with lock held
We're about to call this from a bunch of places which already hold
c->erase_completion_lock, so add an assertion and change its existing
callers to do the same.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs/jffs2/super.c')
-rw-r--r-- | fs/jffs2/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 9a80e8e595d0..12cc967c5c03 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c @@ -63,7 +63,9 @@ static void jffs2_write_super(struct super_block *sb) if (!(sb->s_flags & MS_RDONLY)) { D1(printk(KERN_DEBUG "jffs2_write_super()\n")); + spin_lock(&c->erase_completion_lock); jffs2_garbage_collect_trigger(c); + spin_unlock(&c->erase_completion_lock); jffs2_erase_pending_blocks(c, 0); jffs2_flush_wbuf_gc(c, 0); } |