summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/proc/inode.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 84fd3235a59..a70af3a44f4 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -499,16 +499,15 @@ int proc_fill_super(struct super_block *s)
root_inode = proc_get_inode(s, &proc_root);
if (!root_inode)
goto out_no_root;
- root_inode->i_uid = 0;
- root_inode->i_gid = 0;
s->s_root = d_alloc_root(root_inode);
- if (!s->s_root)
+ if (!s->s_root) {
+ iput(root_inode);
goto out_no_root;
+ }
return 0;
out_no_root:
printk("proc_read_super: get root inode failed\n");
- iput(root_inode);
pde_put(&proc_root);
return -ENOMEM;
}