aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-02-08 07:19:07 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:27 -0500
commitc543f1ee08ea6c2176dbdc47df0d0f6357c88713 (patch)
treeae2d4de96aabbafd3792316d14f40330ec64572d
parent3a515e4a62dbf7e4c213740268a5267faa69e5b2 (diff)
wait_task_zombie: remove ->exit_state/exit_signal checks for WNOWAIT
The first "p->exit_state != EXIT_ZOMBIE" check doesn't make too much sense. The exit_state was EXIT_ZOMBIE when the function was called, and another thread can change it to EXIT_DEAD right after the check. The second condition is not possible, detached non-traced threads were already filtered out by eligible_child(), we didn't drop tasklist since then. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--kernel/exit.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index dee8b4d63403..42a8713b2050 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1196,10 +1196,6 @@ static int wait_task_zombie(struct task_struct *p, int noreap,
1196 int exit_code = p->exit_code; 1196 int exit_code = p->exit_code;
1197 int why, status; 1197 int why, status;
1198 1198
1199 if (unlikely(p->exit_state != EXIT_ZOMBIE))
1200 return 0;
1201 if (unlikely(p->exit_signal == -1 && p->ptrace == 0))
1202 return 0;
1203 get_task_struct(p); 1199 get_task_struct(p);
1204 read_unlock(&tasklist_lock); 1200 read_unlock(&tasklist_lock);
1205 if ((exit_code & 0x7f) == 0) { 1201 if ((exit_code & 0x7f) == 0) {