diff options
author | Andrew Morton <akpm@osdl.org> | 2005-09-23 06:43:44 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-23 07:17:33 +0200 |
commit | 0678e5feaab8b359b18858e8532bb6017edb112b (patch) | |
tree | 41b09ba42b40f75afebd2408d5e101ef214000b5 /fs/proc | |
parent | Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/li... (diff) | |
download | linux-0678e5feaab8b359b18858e8532bb6017edb112b.tar.xz linux-0678e5feaab8b359b18858e8532bb6017edb112b.zip |
[PATCH] proc_task_root_link c99 fix
fs/proc/base.c: In function `proc_task_root_link':
fs/proc/base.c:364: warning: ISO C90 forbids mixed declarations and code
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/proc')
-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; |