]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] fill_tgid: cleanup delays accounting
authorOleg Nesterov <oleg@tv-sign.ru>
Sat, 28 Oct 2006 17:38:54 +0000 (10:38 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 28 Oct 2006 18:30:55 +0000 (11:30 -0700)
fill_tgid() should skip not only an already exited group leader.  If the
task has ->exit_state != 0 it already did exit_notify(), so it also did
fill_tgid_exit()->delayacct_add_tsk(->signal->stats) and we should skip it
to avoid a double accounting.

This patch doesn't close the race completely, but it cleanups the code.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Shailabh Nagar <nagar@watson.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Jay Lan <jlan@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/taskstats.c

index b724aeea5443a37a3e20a65dc71b5739cc370bbe..8adfb8069c6d52be1893b8bd26175d7da9aac838 100644 (file)
@@ -235,7 +235,7 @@ static int fill_tgid(pid_t tgid, struct task_struct *first,
 
        tsk = first;
        do {
-               if (tsk->exit_state == EXIT_ZOMBIE && thread_group_leader(tsk))
+               if (tsk->exit_state)
                        continue;
                /*
                 * Accounting subsystem can call its functions here to