mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [swsusp] clean up process.c
@ 2005-07-03 21:59 Pavel Machek
  0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2005-07-03 21:59 UTC (permalink / raw)
  To: Andrew Morton, kernel list

freezeable() already tests for TRACED/STOPPED processes, no need to do
it twice.

Signed-off-by: Pavel Machek <pavel@suse.cz>

---
commit b72eba9d3b4dd4c73c6a545be67fcaffd9b3c845
tree 3f9611f7267d007c8c7960a492e842dff0c4f987
parent 674f73c9711fdc86c9c60adfefd5f88b32691edf
author <pavel@amd.(none)> Sun, 03 Jul 2005 23:58:28 +0200
committer <pavel@amd.(none)> Sun, 03 Jul 2005 23:58:28 +0200

 kernel/power/process.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/kernel/power/process.c b/kernel/power/process.c
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -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);

-- 
teflon -- maybe it is a trademark, but it should not be.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-03 22:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-03 21:59 [swsusp] clean up process.c Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®