tracehook_notify_death: use task_detached() helper
authorOleg Nesterov <oleg@redhat.com>
Thu, 2 Apr 2009 23:58:20 +0000 (16:58 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Apr 2009 02:05:00 +0000 (19:05 -0700)
Now that task_detached() is exported, change tracehook_notify_death() to
use this helper, nobody else checks ->exit_signal == -1 by hand.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Metzger, Markus T" <markus.t.metzger@intel.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/tracehook.h

index eb4c6545b3842885c998fa9e48957c4af6b3dc60..c7aa154f4bfcf97081048f4e8ab59ef6fa8147ed 100644 (file)
@@ -502,7 +502,7 @@ static inline int tracehook_notify_jctl(int notify, int why)
 static inline int tracehook_notify_death(struct task_struct *task,
                                         void **death_cookie, int group_dead)
 {
-       if (task->exit_signal == -1)
+       if (task_detached(task))
                return task->ptrace ? SIGCHLD : DEATH_REAP;
 
        /*