Commit c2cf7d87 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Linus Torvalds

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: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e7cd8a72
...@@ -149,7 +149,7 @@ static int try_to_freeze_tasks(int freeze_user_space) ...@@ -149,7 +149,7 @@ static int try_to_freeze_tasks(int freeze_user_space)
} while_each_thread(g, p); } while_each_thread(g, p);
read_unlock(&tasklist_lock); read_unlock(&tasklist_lock);
yield(); /* Yield is okay here */ yield(); /* Yield is okay here */
if (todo && time_after(jiffies, end_time)) if (time_after(jiffies, end_time))
break; break;
} while (todo); } while (todo);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment