exit: reparent: introduce find_alive_thread()
authorOleg Nesterov <[email protected]>
Wed, 10 Dec 2014 23:55:14 +0000 (15:55 -0800)
committerLinus Torvalds <[email protected]>
Thu, 11 Dec 2014 01:41:17 +0000 (17:41 -0800)
commitc9dc05bfdb3f7fd7c00f3cbd33816c99d2cb9029
tree2b1f69634ca760afbb4585d5a6a37bc549cd5c7c
parent1109909c7df08f55ff9104276bb9db1ee2e6e53d
exit: reparent: introduce find_alive_thread()

Add the new simple helper to factor out the for_each_thread() code in
find_child_reaper() and find_new_reaper().  It can also simplify the
potential PF_EXITING -> exit_state change, plus perhaps we can change this
code to take SIGNAL_GROUP_EXIT into account.

Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Aaron Tomlin <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Lennart Poettering <[email protected]>
Cc: Sterling Alexander <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/exit.c