summaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2011-06-22 23:09:54 +0200
committerOleg Nesterov <oleg@redhat.com>2011-06-27 20:30:09 +0200
commite550f14dc6322e794d4e70825f63c9c99177ae8b (patch)
tree64f918a0d70f82842211a3c0d54ca658877b5b5d /kernel/exit.c
parent0976a03e5ce8ec346e985f21046d7a75bb7fdffd (diff)
downloadlinux-e550f14dc6322e794d4e70825f63c9c99177ae8b.tar.gz
linux-e550f14dc6322e794d4e70825f63c9c99177ae8b.tar.bz2
linux-e550f14dc6322e794d4e70825f63c9c99177ae8b.zip
kill task_detached()
Upadate the last user of task_detached(), wait_task_zombie(), to use thread_group_leader() and kill task_detached(). Signed-off-by: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 2b1ba8048a14..9fa99702645d 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -189,7 +189,6 @@ repeat:
zap_leader = 0;
leader = p->group_leader;
if (leader != p && thread_group_empty(leader) && leader->exit_state == EXIT_ZOMBIE) {
- BUG_ON(task_detached(leader));
/*
* If we were the last child thread and the leader has
* exited already, and the leader's parent ignores SIGCHLD,
@@ -1231,9 +1230,9 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
traced = ptrace_reparented(p);
/*
* It can be ptraced but not reparented, check
- * !task_detached() to filter out sub-threads.
+ * thread_group_leader() to filter out sub-threads.
*/
- if (likely(!traced) && likely(!task_detached(p))) {
+ if (likely(!traced) && thread_group_leader(p)) {
struct signal_struct *psig;
struct signal_struct *sig;
unsigned long maxrss;