提交 1322ad41 编写于 作者: P Pavel Machek 提交者: Linus Torvalds

[PATCH] pm: clean up process.c

freezeable() already tests for TRACED/STOPPED processes, no need to do it
twice.
Signed-off-by: NPavel Machek <pavel@suse.cz>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 47b724f3
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册