Commit 1065d130 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

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: default avatarOleg Nesterov <oleg@tv-sign.ru>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fca3b747
......@@ -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;
}
......
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