[PATCH] pm: clean up process.c
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>
This commit is contained in:
parent
47b724f3fe
commit
1322ad4151
@ -59,6 +59,7 @@ int freeze_processes(void)
|
|||||||
int todo;
|
int todo;
|
||||||
unsigned long start_time;
|
unsigned long start_time;
|
||||||
struct task_struct *g, *p;
|
struct task_struct *g, *p;
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
printk( "Stopping tasks: " );
|
printk( "Stopping tasks: " );
|
||||||
start_time = jiffies;
|
start_time = jiffies;
|
||||||
@ -66,12 +67,9 @@ int freeze_processes(void)
|
|||||||
todo = 0;
|
todo = 0;
|
||||||
read_lock(&tasklist_lock);
|
read_lock(&tasklist_lock);
|
||||||
do_each_thread(g, p) {
|
do_each_thread(g, p) {
|
||||||
unsigned long flags;
|
|
||||||
if (!freezeable(p))
|
if (!freezeable(p))
|
||||||
continue;
|
continue;
|
||||||
if ((frozen(p)) ||
|
if (frozen(p))
|
||||||
(p->state == TASK_TRACED) ||
|
|
||||||
(p->state == TASK_STOPPED))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
freeze(p);
|
freeze(p);
|
||||||
|
Loading…
Reference in New Issue
Block a user