summaryrefslogtreecommitdiffstats
path: root/fs/proc/self.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/self.c')
-rw-r--r--fs/proc/self.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/self.c b/fs/proc/self.c
index 67e8db442cf0..b6a8d3529fea 100644
--- a/fs/proc/self.c
+++ b/fs/proc/self.c
@@ -50,7 +50,7 @@ int proc_setup_self(struct super_block *s)
50 struct pid_namespace *ns = s->s_fs_info; 50 struct pid_namespace *ns = s->s_fs_info;
51 struct dentry *self; 51 struct dentry *self;
52 52
53 mutex_lock(&root_inode->i_mutex); 53 inode_lock(root_inode);
54 self = d_alloc_name(s->s_root, "self"); 54 self = d_alloc_name(s->s_root, "self");
55 if (self) { 55 if (self) {
56 struct inode *inode = new_inode_pseudo(s); 56 struct inode *inode = new_inode_pseudo(s);
@@ -69,7 +69,7 @@ int proc_setup_self(struct super_block *s)
69 } else { 69 } else {
70 self = ERR_PTR(-ENOMEM); 70 self = ERR_PTR(-ENOMEM);
71 } 71 }
72 mutex_unlock(&root_inode->i_mutex); 72 inode_unlock(root_inode);
73 if (IS_ERR(self)) { 73 if (IS_ERR(self)) {
74 pr_err("proc_fill_super: can't allocate /proc/self\n"); 74 pr_err("proc_fill_super: can't allocate /proc/self\n");
75 return PTR_ERR(self); 75 return PTR_ERR(self);