From: Pavel Machek Date: Fri, 8 Jul 2005 00:56:45 +0000 (-0700) Subject: [PATCH] pm: clean up process.c X-Git-Tag: v2.6.13-rc3~258 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1322ad41513f8f9196801f53cc0851df056f3478;p=linux-2.6 [PATCH] pm: clean up process.c freezeable() already tests for TRACED/STOPPED processes, no need to do it twice. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/power/process.c b/kernel/power/process.c index 0a086640bc..3bd0d26181 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c @@ -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);