[PATCH] pid: remove temporary debug code in attach_pid
[pandora-kernel.git] / kernel / exit.c
index 3c2cf91..d891883 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/mount.h>
 #include <linux/proc_fs.h>
 #include <linux/mempolicy.h>
+#include <linux/taskstats_kern.h>
 #include <linux/delayacct.h>
 #include <linux/cpuset.h>
 #include <linux/syscalls.h>
@@ -844,7 +845,9 @@ static void exit_notify(struct task_struct *tsk)
 fastcall NORET_TYPE void do_exit(long code)
 {
        struct task_struct *tsk = current;
+       struct taskstats *tidstats;
        int group_dead;
+       unsigned int mycpu;
 
        profile_task_exit(tsk);
 
@@ -882,6 +885,8 @@ fastcall NORET_TYPE void do_exit(long code)
                                current->comm, current->pid,
                                preempt_count());
 
+       taskstats_exit_alloc(&tidstats, &mycpu);
+
        acct_update_integrals(tsk);
        if (tsk->mm) {
                update_hiwater_rss(tsk->mm);
@@ -901,7 +906,9 @@ fastcall NORET_TYPE void do_exit(long code)
 #endif
        if (unlikely(tsk->audit_context))
                audit_free(tsk);
-       delayacct_tsk_exit(tsk);
+       taskstats_exit_send(tsk, tidstats, group_dead, mycpu);
+       taskstats_exit_free(tidstats);
+
        exit_mm(tsk);
 
        if (group_dead)
@@ -1046,7 +1053,7 @@ static int eligible_child(pid_t pid, int options, struct task_struct *p)
         * Do not consider thread group leaders that are
         * in a non-empty thread group:
         */
-       if (current->tgid != p->tgid && delay_group_leader(p))
+       if (delay_group_leader(p))
                return 2;
 
        if (security_task_wait(p))