From acb64a43e4503fbea9faf123f2403da7af8831eb Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 19 May 2010 17:00:10 +0100 Subject: 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 --- fs/jffs2/background.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/jffs2/background.c') diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c index 3ff50da94789..55f1dde2fa8b 100644 --- a/fs/jffs2/background.c +++ b/fs/jffs2/background.c @@ -23,10 +23,9 @@ static int jffs2_garbage_collect_thread(void *); void jffs2_garbage_collect_trigger(struct jffs2_sb_info *c) { - spin_lock(&c->erase_completion_lock); + assert_spin_locked(&c->erase_completion_lock); if (c->gc_task && jffs2_thread_should_wake(c)) send_sig(SIGHUP, c->gc_task, 1); - spin_unlock(&c->erase_completion_lock); } /* This must only ever be called when no GC thread is currently running */ -- cgit v1.2.3