Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b687707d769112aee220bafd50fa113363717ff
Commit:     7b687707d769112aee220bafd50fa113363717ff
Parent:     71c23397752c0e40722d931ab9152342e9673336
Author:     David Woodhouse <[EMAIL PROTECTED]>
AuthorDate: Thu Jun 28 19:49:36 2007 +0100
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 21:43:03 2007 +0100

    [JFFS2] Fix suspend failure with JFFS2 GC thread.
    
    The try_to_freeze() call was in the wrong place; we need it in the
    signal-pending loop now that a pending freeze also makes
    signal_pending() return true.
    
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 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 143c553..504643f 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) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to