summaryrefslogtreecommitdiff
path: root/fs/jffs2/background.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-02 14:08:53 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-02 14:08:53 -0700
commit7a883eaf62f4b943ebec738ce3b0796c67ef5d32 (patch)
tree8c7382552b62a8f1629ce77a2ababb99ebe95112 /fs/jffs2/background.c
parent628506c8de058f94297dae1f8ef8caaea29c4369 (diff)
parent515495a1da9abf339b922b7919c4950e85b87b42 (diff)
Merge git://git.infradead.org/~dwmw2/mtd-2.6.23
* git://git.infradead.org/~dwmw2/mtd-2.6.23: [MTD] [NAND] nand_base.c: fix type of eccpos pointer [MTD] [NAND] at91_nand rdy_pin fix [MTD] [NAND] fix race in nand_base.c [MTD] [NAND] Fix refactoring of EDB7312 hwcontrol function. [MTD] Fix potential leak in rfd_ftl_add_mtd [JFFS2] Print correct node offset when complaining about broken data CRC [JFFS2] Fix suspend failure with JFFS2 GC thread. [JFFS2] Deletion dirents should be REF_NORMAL, not REF_PRISTINE. [JFFS2] Prevent oops after 'node added in wrong place' debug check
Diffstat (limited to 'fs/jffs2/background.c')
-rw-r--r--fs/jffs2/background.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c
index 143c5530caf3..504643f2e98b 100644
--- a/fs/jffs2/background.c
+++ b/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, &current->blocked, &info);
switch(signr) {