]> err.no Git - linux-2.6/commitdiff
[PATCH] pm: clean up process.c
authorPavel Machek <pavel@ucw.cz>
Fri, 8 Jul 2005 00:56:45 +0000 (17:56 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 8 Jul 2005 01:23:43 +0000 (18:23 -0700)
freezeable() already tests for TRACED/STOPPED processes, no need to do it
twice.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/power/process.c

index 0a086640bcfc15cce008901702549fd0061a498c..3bd0d261818f5d7769af8b265544dbe8abf5d519 100644 (file)
@@ -59,6 +59,7 @@ int freeze_processes(void)
        int todo;
        unsigned long start_time;
        struct task_struct *g, *p;
+       unsigned long flags;
 
        printk( "Stopping tasks: " );
        start_time = jiffies;
@@ -66,12 +67,9 @@ int freeze_processes(void)
                todo = 0;
                read_lock(&tasklist_lock);
                do_each_thread(g, p) {
-                       unsigned long flags;
                        if (!freezeable(p))
                                continue;
-                       if ((frozen(p)) ||
-                           (p->state == TASK_TRACED) ||
-                           (p->state == TASK_STOPPED))
+                       if (frozen(p))
                                continue;
 
                        freeze(p);