diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2007-10-17 02:27:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:42:52 -0400 |
commit | 715015e8da37c4d13e234def054bcbea116297e9 (patch) | |
tree | 3c3f2cd1d516d13d50ad33519dfe98a75243eb0d | |
parent | 18442cf28af81378cf8996d264b368bba47cf846 (diff) |
wait_task_stopped/continued: remove unneeded p->signal != NULL check
The child was found on ->children list under tasklist_lock, it must have a
valid ->signal. __exit_signal() both removes the task from parent->children
and clears ->signal "atomically" under write_lock(tasklist).
Remove unneeded checks.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
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>
-rw-r--r-- | kernel/exit.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index b27a3dcde671..25f6805be5fe 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -1322,7 +1322,7 @@ static int wait_task_stopped(struct task_struct *p, int delayed_group_leader, | |||
1322 | if (!p->exit_code) | 1322 | if (!p->exit_code) |
1323 | return 0; | 1323 | return 0; |
1324 | if (delayed_group_leader && !(p->ptrace & PT_PTRACED) && | 1324 | if (delayed_group_leader && !(p->ptrace & PT_PTRACED) && |
1325 | p->signal && p->signal->group_stop_count > 0) | 1325 | p->signal->group_stop_count > 0) |
1326 | /* | 1326 | /* |
1327 | * A group stop is in progress and this is the group leader. | 1327 | * A group stop is in progress and this is the group leader. |
1328 | * We won't report until all threads have stopped. | 1328 | * We won't report until all threads have stopped. |
@@ -1436,9 +1436,6 @@ static int wait_task_continued(struct task_struct *p, int noreap, | |||
1436 | pid_t pid; | 1436 | pid_t pid; |
1437 | uid_t uid; | 1437 | uid_t uid; |
1438 | 1438 | ||
1439 | if (unlikely(!p->signal)) | ||
1440 | return 0; | ||
1441 | |||
1442 | if (!(p->signal->flags & SIGNAL_STOP_CONTINUED)) | 1439 | if (!(p->signal->flags & SIGNAL_STOP_CONTINUED)) |
1443 | return 0; | 1440 | return 0; |
1444 | 1441 | ||