diff options
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 5ee46d3a5cac..43871c85729d 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -2267,15 +2267,15 @@ out: | |||
2267 | */ | 2267 | */ |
2268 | static struct task_struct *next_tid(struct task_struct *start) | 2268 | static struct task_struct *next_tid(struct task_struct *start) |
2269 | { | 2269 | { |
2270 | struct task_struct *pos; | 2270 | struct task_struct *pos = NULL; |
2271 | rcu_read_lock(); | 2271 | rcu_read_lock(); |
2272 | pos = start; | 2272 | if (pid_alive(start)) { |
2273 | if (pid_alive(start)) | ||
2274 | pos = next_thread(start); | 2273 | pos = next_thread(start); |
2275 | if (pid_alive(pos) && (pos != start->group_leader)) | 2274 | if (thread_group_leader(pos)) |
2276 | get_task_struct(pos); | 2275 | pos = NULL; |
2277 | else | 2276 | else |
2278 | pos = NULL; | 2277 | get_task_struct(pos); |
2278 | } | ||
2279 | rcu_read_unlock(); | 2279 | rcu_read_unlock(); |
2280 | put_task_struct(start); | 2280 | put_task_struct(start); |
2281 | return pos; | 2281 | return pos; |