diff options
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 05452c3b9872..483a3edebdd1 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -3813,11 +3813,10 @@ static struct task_struct *first_tid(struct pid *pid, int tid, loff_t f_pos, /* If we haven't found our starting place yet start * with the leader and walk nr threads forward. */ - pos = task = task->group_leader; - do { + for_each_thread(task, pos) { if (!nr--) goto found; - } while_each_thread(task, pos); + }; fail: pos = NULL; goto out; |