Skip to content

Commit

Permalink
[PATCH] proc_task_root_link c99 fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Sep 23, 2005
1 parent e53897e commit 0678e5f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 0678e5f

Please sign in to comment.