From f6e9e68438835300066a9fbf1f07538a1147043f Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 28 Jun 2007 19:49:36 +0100 Subject: [PATCH] --- yaml --- r: 63593 b: refs/heads/master c: 7b687707d769112aee220bafd50fa113363717ff h: refs/heads/master i: 63591: b19de3f6b6c8d727f9dafa1995f4295a8ccca271 v: v3 --- [refs] | 2 +- trunk/fs/jffs2/background.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 8a6656e2a981..850f773cc9be 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 71c23397752c0e40722d931ab9152342e9673336 +refs/heads/master: 7b687707d769112aee220bafd50fa113363717ff diff --git a/trunk/fs/jffs2/background.c b/trunk/fs/jffs2/background.c index 143c5530caf3..504643f2e98b 100644 --- a/trunk/fs/jffs2/background.c +++ b/trunk/fs/jffs2/background.c @@ -84,7 +84,7 @@ static int jffs2_garbage_collect_thread(void *_c) set_freezable(); 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")); @@ -95,9 +95,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 @@ -112,6 +109,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) {