]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] proc_task_root_link c99 fix
authorAndrew Morton <akpm@osdl.org>
Fri, 23 Sep 2005 04:43:44 +0000 (21:43 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Sep 2005 05:17:33 +0000 (22:17 -0700)
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>
fs/proc/base.c

index fb34f88a4a747abc6251a8895c31ec13dceb3a1f..3b33f94020db827f6563ec5f978165d4711dc907 100644 (file)
@@ -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;