Commit 1322ad41513f8f9196801f53cc0851df056f3478
Committed by
Linus Torvalds
1 parent
47b724f3fe
Exists in
master
and in
7 other branches
[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>
Showing 1 changed file with 2 additions and 4 deletions Side-by-side Diff
kernel/power/process.c
... | ... | @@ -59,6 +59,7 @@ |
59 | 59 | int todo; |
60 | 60 | unsigned long start_time; |
61 | 61 | struct task_struct *g, *p; |
62 | + unsigned long flags; | |
62 | 63 | |
63 | 64 | printk( "Stopping tasks: " ); |
64 | 65 | start_time = jiffies; |
65 | 66 | |
... | ... | @@ -66,12 +67,9 @@ |
66 | 67 | todo = 0; |
67 | 68 | read_lock(&tasklist_lock); |
68 | 69 | do_each_thread(g, p) { |
69 | - unsigned long flags; | |
70 | 70 | if (!freezeable(p)) |
71 | 71 | continue; |
72 | - if ((frozen(p)) || | |
73 | - (p->state == TASK_TRACED) || | |
74 | - (p->state == TASK_STOPPED)) | |
72 | + if (frozen(p)) | |
75 | 73 | continue; |
76 | 74 | |
77 | 75 | freeze(p); |