From 1065d130dddc3241706c50a01ced7b03bcb657be Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Tue, 8 May 2007 00:24:01 -0700 Subject: 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 --- kernel/power/process.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'kernel') 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; } -- cgit v1.2.3