aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-02-12 21:06:12 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-03-20 21:29:33 -0400
commit064326c0773af8a0e8bb82d895cceaedc8a51b9e (patch)
tree572cb5c160580f5c9ab91bb5ac42d53d0a0f0cdd /fs/cifs
parent9bcb4b733c22b7dbc4cf847e707ac98f751e9180 (diff)
clean up the failure exits in cifs_read_super()
no need to make that iput() conditional, just take it to the right place... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifsfs.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index b1fd382d1952..8b7d7ff88792 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -119,7 +119,6 @@ cifs_read_super(struct super_block *sb)
119 119
120 if (IS_ERR(inode)) { 120 if (IS_ERR(inode)) {
121 rc = PTR_ERR(inode); 121 rc = PTR_ERR(inode);
122 inode = NULL;
123 goto out_no_root; 122 goto out_no_root;
124 } 123 }
125 124
@@ -127,6 +126,7 @@ cifs_read_super(struct super_block *sb)
127 126
128 if (!sb->s_root) { 127 if (!sb->s_root) {
129 rc = -ENOMEM; 128 rc = -ENOMEM;
129 iput(inode);
130 goto out_no_root; 130 goto out_no_root;
131 } 131 }
132 132
@@ -147,9 +147,6 @@ cifs_read_super(struct super_block *sb)
147 147
148out_no_root: 148out_no_root:
149 cERROR(1, "cifs_read_super: get root inode failed"); 149 cERROR(1, "cifs_read_super: get root inode failed");
150 if (inode)
151 iput(inode);
152
153 return rc; 150 return rc;
154} 151}
155 152