aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index fb34f88a4a74..3b33f94020db 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -343,7 +343,8 @@ static int proc_root_link(struct inode *inode, struct dentry **dentry, struct vf
343 343
344/* Same as proc_root_link, but this addionally tries to get fs from other 344/* Same as proc_root_link, but this addionally tries to get fs from other
345 * threads in the group */ 345 * threads in the group */
346static int proc_task_root_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt) 346static int proc_task_root_link(struct inode *inode, struct dentry **dentry,
347 struct vfsmount **mnt)
347{ 348{
348 struct fs_struct *fs; 349 struct fs_struct *fs;
349 int result = -ENOENT; 350 int result = -ENOENT;
@@ -357,9 +358,10 @@ static int proc_task_root_link(struct inode *inode, struct dentry **dentry, stru
357 } else { 358 } else {
358 /* Try to get fs from other threads */ 359 /* Try to get fs from other threads */
359 task_unlock(leader); 360 task_unlock(leader);
360 struct task_struct *task = leader;
361 read_lock(&tasklist_lock); 361 read_lock(&tasklist_lock);
362 if (pid_alive(task)) { 362 if (pid_alive(leader)) {
363 struct task_struct *task = leader;
364
363 while ((task = next_thread(task)) != leader) { 365 while ((task = next_thread(task)) != leader) {
364 task_lock(task); 366 task_lock(task);
365 fs = task->fs; 367 fs = task->fs;