summaryrefslogtreecommitdiffstats
path: root/kernel/taskstats.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2006-10-28 19:38:54 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-28 20:30:55 +0200
commitd7c3f5f231c60d7e6ada5770b536df2b3ec1bd08 (patch)
tree04bd0ce8b70f7a43195a210d8dd6a808be329a1c /kernel/taskstats.c
parent[PATCH] taskstats: don't use tasklist_lock (diff)
downloadlinux-d7c3f5f231c60d7e6ada5770b536df2b3ec1bd08.tar.xz
linux-d7c3f5f231c60d7e6ada5770b536df2b3ec1bd08.zip
[PATCH] fill_tgid: cleanup delays accounting
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>
Diffstat (limited to 'kernel/taskstats.c')
-rw-r--r--kernel/taskstats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index b724aeea5443..8adfb8069c6d 100644
--- a/kernel/taskstats.c
+++ b/kernel/taskstats.c
@@ -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