diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2005-09-26 10:50:29 +0100 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2005-09-26 10:50:29 +0100 |
| commit | e8c2cd99a3933d93413910bc93cbd5b53177110b (patch) | |
| tree | ea4c1d63b1bdeb9ef1aacacad0ac9c7dc0768fdc /fs/proc/base.c | |
| parent | 5a8c0cc32bb6e029cd9c36f655c6b0955b0d9967 (diff) | |
| parent | 8ddec7460d2f5db3ac35812c03676b1473d1d668 (diff) | |
Merge branch 'master' of /home/src/linux-2.6/
Diffstat (limited to 'fs/proc/base.c')
| -rw-r--r-- | fs/proc/base.c | 8 |
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 /* Same as proc_root_link, but this addionally tries to get fs from other * threads in the group */ -static int proc_task_root_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt) +static int proc_task_root_link(struct inode *inode, struct dentry **dentry, + struct vfsmount **mnt) { struct fs_struct *fs; int result = -ENOENT; @@ -357,9 +358,10 @@ static int proc_task_root_link(struct inode *inode, struct dentry **dentry, stru } else { /* Try to get fs from other threads */ task_unlock(leader); - struct task_struct *task = leader; read_lock(&tasklist_lock); - if (pid_alive(task)) { + if (pid_alive(leader)) { + struct task_struct *task = leader; + while ((task = next_thread(task)) != leader) { task_lock(task); fs = task->fs; |
