diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-07-19 04:47:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:04:42 -0400 |
commit | c2cf7d87d804c66e063829d5ca739053e901dc15 (patch) | |
tree | 0c8217d9dca6a3ffcf4073315a6a8f6328639b3a /kernel/power | |
parent | e7cd8a722745a01bcfac4d4a52d53391d177da20 (diff) |
Freezer: remove redundant check in try_to_freeze_tasks
We don't need to check if todo is positive before calling time_after() in
try_to_freeze_tasks(), because if todo is zero at this point, the loop will be
broken anyway due to the while () condition being false.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c index 00cdbe5f518f..3434940a3df1 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c | |||
@@ -149,7 +149,7 @@ static int try_to_freeze_tasks(int freeze_user_space) | |||
149 | } while_each_thread(g, p); | 149 | } while_each_thread(g, p); |
150 | read_unlock(&tasklist_lock); | 150 | read_unlock(&tasklist_lock); |
151 | yield(); /* Yield is okay here */ | 151 | yield(); /* Yield is okay here */ |
152 | if (todo && time_after(jiffies, end_time)) | 152 | if (time_after(jiffies, end_time)) |
153 | break; | 153 | break; |
154 | } while (todo); | 154 | } while (todo); |
155 | 155 | ||