From: Oleg Nesterov Date: Tue, 8 May 2007 07:24:01 +0000 (-0700) Subject: freezer: task->exit_state should be treated as bolean X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1065d130dddc3241706c50a01ced7b03bcb657be;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git freezer: task->exit_state should be treated as bolean Except for BUG_ON() checks, we should not use EXIT_XXXX defines outside of exit/wait paths. Signed-off-by: Oleg Nesterov Cc: "Rafael J. Wysocki" Cc: Pavel Machek Cc: Ingo Molnar Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/power/process.c b/kernel/power/process.c index 0eb5c420e8ed..179529dc3819 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c @@ -25,10 +25,9 @@ static inline int freezeable(struct task_struct * p) { - if ((p == current) || + if ((p == current) || (p->flags & PF_NOFREEZE) || - (p->exit_state == EXIT_ZOMBIE) || - (p->exit_state == EXIT_DEAD)) + (p->exit_state != 0)) return 0; return 1; }