[swsusp] clean up process.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Pavel Machek <[email protected]>

---
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux