Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256856
b: refs/heads/master
c: e550f14
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov committed Jun 27, 2011
1 parent c191627 commit 03adfb5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0976a03e5ce8ec346e985f21046d7a75bb7fdffd
refs/heads/master: e550f14dc6322e794d4e70825f63c9c99177ae8b
5 changes: 0 additions & 5 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -2318,11 +2318,6 @@ static inline int thread_group_empty(struct task_struct *p)
#define delay_group_leader(p) \
(thread_group_leader(p) && !thread_group_empty(p))

static inline int task_detached(struct task_struct *p)
{
return p->exit_signal == -1;
}

/*
* Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring
* subscriptions and synchronises with wait4(). Also used in procfs. Also
Expand Down
5 changes: 2 additions & 3 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ void release_task(struct task_struct * p)
zap_leader = 0;
leader = p->group_leader;
if (leader != p && thread_group_empty(leader) && leader->exit_state == EXIT_ZOMBIE) {
BUG_ON(task_detached(leader));
/*
* If we were the last child thread and the leader has
* exited already, and the leader's parent ignores SIGCHLD,
Expand Down Expand Up @@ -1231,9 +1230,9 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
traced = ptrace_reparented(p);
/*
* It can be ptraced but not reparented, check
* !task_detached() to filter out sub-threads.
* thread_group_leader() to filter out sub-threads.
*/
if (likely(!traced) && likely(!task_detached(p))) {
if (likely(!traced) && thread_group_leader(p)) {
struct signal_struct *psig;
struct signal_struct *sig;
unsigned long maxrss;
Expand Down

0 comments on commit 03adfb5

Please sign in to comment.