diff options
-rw-r--r-- | fs/jffs2/background.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c index 0c82dfcfd246..39bd6c7a9b62 100644 --- a/fs/jffs2/background.c +++ b/fs/jffs2/background.c | |||
@@ -83,7 +83,7 @@ static int jffs2_garbage_collect_thread(void *_c) | |||
83 | 83 | ||
84 | for (;;) { | 84 | for (;;) { |
85 | allow_signal(SIGHUP); | 85 | allow_signal(SIGHUP); |
86 | 86 | again: | |
87 | if (!jffs2_thread_should_wake(c)) { | 87 | if (!jffs2_thread_should_wake(c)) { |
88 | set_current_state (TASK_INTERRUPTIBLE); | 88 | set_current_state (TASK_INTERRUPTIBLE); |
89 | D1(printk(KERN_DEBUG "jffs2_garbage_collect_thread sleeping...\n")); | 89 | D1(printk(KERN_DEBUG "jffs2_garbage_collect_thread sleeping...\n")); |
@@ -94,9 +94,6 @@ static int jffs2_garbage_collect_thread(void *_c) | |||
94 | schedule(); | 94 | schedule(); |
95 | } | 95 | } |
96 | 96 | ||
97 | if (try_to_freeze()) | ||
98 | continue; | ||
99 | |||
100 | /* This thread is purely an optimisation. But if it runs when | 97 | /* This thread is purely an optimisation. But if it runs when |
101 | other things could be running, it actually makes things a | 98 | other things could be running, it actually makes things a |
102 | lot worse. Use yield() and put it at the back of the runqueue | 99 | 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) | |||
111 | siginfo_t info; | 108 | siginfo_t info; |
112 | unsigned long signr; | 109 | unsigned long signr; |
113 | 110 | ||
111 | if (try_to_freeze()) | ||
112 | goto again; | ||
113 | |||
114 | signr = dequeue_signal_lock(current, ¤t->blocked, &info); | 114 | signr = dequeue_signal_lock(current, ¤t->blocked, &info); |
115 | 115 | ||
116 | switch(signr) { | 116 | switch(signr) { |