From 5f240b3d2c69c956ed2d459eb903d5a0ff433a28 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Mon, 26 Jun 2006 00:26:02 -0700 Subject: [PATCH] --- yaml --- r: 30260 b: refs/heads/master c: c1df7fb88a011b39ea722ac00975c5b8a803261b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/proc/base.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index f1ec82dc8b70..6ab28cde3696 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a872ff0cb2218dc9688b990c5ccda064dc40946b +refs/heads/master: c1df7fb88a011b39ea722ac00975c5b8a803261b diff --git a/trunk/fs/proc/base.c b/trunk/fs/proc/base.c index 5ee46d3a5cac..43871c85729d 100644 --- a/trunk/fs/proc/base.c +++ b/trunk/fs/proc/base.c @@ -2267,15 +2267,15 @@ static struct task_struct *first_tid(struct task_struct *leader, */ static struct task_struct *next_tid(struct task_struct *start) { - struct task_struct *pos; + struct task_struct *pos = NULL; rcu_read_lock(); - pos = start; - if (pid_alive(start)) + if (pid_alive(start)) { pos = next_thread(start); - if (pid_alive(pos) && (pos != start->group_leader)) - get_task_struct(pos); - else - pos = NULL; + if (thread_group_leader(pos)) + pos = NULL; + else + get_task_struct(pos); + } rcu_read_unlock(); put_task_struct(start); return pos;