Skip to content

Commit

Permalink
[PATCH] pm: clean up process.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Machek authored and Linus Torvalds committed Jul 8, 2005
1 parent 47b724f commit 1322ad4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions kernel/power/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,17 @@ int freeze_processes(void)
int todo;
unsigned long start_time;
struct task_struct *g, *p;
unsigned long flags;

printk( "Stopping tasks: " );
start_time = jiffies;
do {
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);
Expand Down

0 comments on commit 1322ad4

Please sign in to comment.