diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/base.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 2236f7d3878e..cc578a300a2b 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -2043,7 +2043,7 @@ out: | |||
2043 | static struct task_struct *first_tgid(int tgid, int nr) | 2043 | static struct task_struct *first_tgid(int tgid, int nr) |
2044 | { | 2044 | { |
2045 | struct task_struct *pos = NULL; | 2045 | struct task_struct *pos = NULL; |
2046 | read_lock(&tasklist_lock); | 2046 | rcu_read_lock(); |
2047 | if (tgid && nr) { | 2047 | if (tgid && nr) { |
2048 | pos = find_task_by_pid(tgid); | 2048 | pos = find_task_by_pid(tgid); |
2049 | if (pos && !thread_group_leader(pos)) | 2049 | if (pos && !thread_group_leader(pos)) |
@@ -2069,7 +2069,7 @@ static struct task_struct *first_tgid(int tgid, int nr) | |||
2069 | } | 2069 | } |
2070 | pos = NULL; | 2070 | pos = NULL; |
2071 | done: | 2071 | done: |
2072 | read_unlock(&tasklist_lock); | 2072 | rcu_read_unlock(); |
2073 | return pos; | 2073 | return pos; |
2074 | } | 2074 | } |
2075 | 2075 | ||
@@ -2082,7 +2082,7 @@ done: | |||
2082 | static struct task_struct *next_tgid(struct task_struct *start) | 2082 | static struct task_struct *next_tgid(struct task_struct *start) |
2083 | { | 2083 | { |
2084 | struct task_struct *pos; | 2084 | struct task_struct *pos; |
2085 | read_lock(&tasklist_lock); | 2085 | rcu_read_lock(); |
2086 | pos = start; | 2086 | pos = start; |
2087 | if (pid_alive(start)) | 2087 | if (pid_alive(start)) |
2088 | pos = next_task(start); | 2088 | pos = next_task(start); |
@@ -2092,7 +2092,7 @@ static struct task_struct *next_tgid(struct task_struct *start) | |||
2092 | } | 2092 | } |
2093 | pos = NULL; | 2093 | pos = NULL; |
2094 | done: | 2094 | done: |
2095 | read_unlock(&tasklist_lock); | 2095 | rcu_read_unlock(); |
2096 | put_task_struct(start); | 2096 | put_task_struct(start); |
2097 | return pos; | 2097 | return pos; |
2098 | } | 2098 | } |