From 2f851051a76cd5d69fd7e454739ab2370debcdd7 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 28 Jun 2007 19:49:36 +0100 Subject: [PATCH] --- yaml --- r: 68450 b: refs/heads/master c: e716dd3644c2a79d6ffa4359bac06f57479dcb34 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/jffs2/background.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index e5cdd0775e9c..fca8b65cf6f0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 66bfaeaa90432a585d7e9e70605ee4df3ede9890 +refs/heads/master: e716dd3644c2a79d6ffa4359bac06f57479dcb34 diff --git a/trunk/fs/jffs2/background.c b/trunk/fs/jffs2/background.c index 0c82dfcfd246..39bd6c7a9b62 100644 --- a/trunk/fs/jffs2/background.c +++ b/trunk/fs/jffs2/background.c @@ -83,7 +83,7 @@ static int jffs2_garbage_collect_thread(void *_c) for (;;) { allow_signal(SIGHUP); - + again: if (!jffs2_thread_should_wake(c)) { set_current_state (TASK_INTERRUPTIBLE); D1(printk(KERN_DEBUG "jffs2_garbage_collect_thread sleeping...\n")); @@ -94,9 +94,6 @@ static int jffs2_garbage_collect_thread(void *_c) schedule(); } - if (try_to_freeze()) - continue; - /* This thread is purely an optimisation. But if it runs when other things could be running, it actually makes things a lot worse. Use yield() and put it at the back of the runqueue @@ -111,6 +108,9 @@ static int jffs2_garbage_collect_thread(void *_c) siginfo_t info; unsigned long signr; + if (try_to_freeze()) + goto again; + signr = dequeue_signal_lock(current, ¤t->blocked, &info); switch(signr) {