Skip to content

Commit

Permalink
freezer: task->exit_state should be treated as bolean
Browse files Browse the repository at this point in the history
Except for BUG_ON() checks, we should not use EXIT_XXXX defines outside of
exit/wait paths.

Signed-off-by: Oleg Nesterov <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Pavel Machek <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Nick Piggin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed May 8, 2007
1 parent fca3b74 commit 1065d13
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kernel/power/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1065d13

Please sign in to comment.