aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2005-07-07 20:56:45 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:23:43 -0400
commit1322ad41513f8f9196801f53cc0851df056f3478 (patch)
treec7494232c8d2bb840368c664be256b93bf6696fa /kernel
parent47b724f3fe372a3d9acf0bb560fb5c93c9867880 (diff)
[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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/process.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c
index 0a086640bcfc..3bd0d261818f 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -59,6 +59,7 @@ int freeze_processes(void)
59 int todo; 59 int todo;
60 unsigned long start_time; 60 unsigned long start_time;
61 struct task_struct *g, *p; 61 struct task_struct *g, *p;
62 unsigned long flags;
62 63
63 printk( "Stopping tasks: " ); 64 printk( "Stopping tasks: " );
64 start_time = jiffies; 65 start_time = jiffies;
@@ -66,12 +67,9 @@ int freeze_processes(void)
66 todo = 0; 67 todo = 0;
67 read_lock(&tasklist_lock); 68 read_lock(&tasklist_lock);
68 do_each_thread(g, p) { 69 do_each_thread(g, p) {
69 unsigned long flags;
70 if (!freezeable(p)) 70 if (!freezeable(p))
71 continue; 71 continue;
72 if ((frozen(p)) || 72 if (frozen(p))
73 (p->state == TASK_TRACED) ||
74 (p->state == TASK_STOPPED))
75 continue; 73 continue;
76 74
77 freeze(p); 75 freeze(p);