aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/power/process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c
index eefca8581fa..2cea2658e98 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -120,7 +120,7 @@ static unsigned int try_to_freeze_tasks(int freeze_user_space)
cancel_freezing(p);
continue;
}
- if (is_user_space(p) == !freeze_user_space)
+ if (freeze_user_space && !is_user_space(p))
continue;
freeze_process(p);
@@ -147,7 +147,7 @@ static unsigned int try_to_freeze_tasks(int freeze_user_space)
TIMEOUT / HZ, todo);
read_lock(&tasklist_lock);
do_each_thread(g, p) {
- if (is_user_space(p) == !freeze_user_space)
+ if (freeze_user_space && !is_user_space(p))
continue;
task_lock(p);