aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coda
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-02-12 21:15:58 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-03-20 21:29:34 -0400
commitf56b0fbc6477e50303a503ee1453ed94e20f154a (patch)
tree633b2f01e678cf519012377492b28b96e5273da1 /fs/coda
parent064326c0773af8a0e8bb82d895cceaedc8a51b9e (diff)
coda: clean failure exits in coda_fill_super()
same as for cifs, move iput() to the right place, make it unconditional Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/coda')
-rw-r--r--fs/coda/inode.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index 5e2e1b3f068d..32dafc875c14 100644
--- a/fs/coda/inode.c
+++ b/fs/coda/inode.c
@@ -208,7 +208,6 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
208 if (IS_ERR(root)) { 208 if (IS_ERR(root)) {
209 error = PTR_ERR(root); 209 error = PTR_ERR(root);
210 printk("Failure of coda_cnode_make for root: error %d\n", error); 210 printk("Failure of coda_cnode_make for root: error %d\n", error);
211 root = NULL;
212 goto error; 211 goto error;
213 } 212 }
214 213
@@ -216,15 +215,13 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
216 root->i_ino, root->i_sb->s_id); 215 root->i_ino, root->i_sb->s_id);
217 sb->s_root = d_alloc_root(root); 216 sb->s_root = d_alloc_root(root);
218 if (!sb->s_root) { 217 if (!sb->s_root) {
218 iput(root);
219 error = -EINVAL; 219 error = -EINVAL;
220 goto error; 220 goto error;
221 } 221 }
222 return 0; 222 return 0;
223 223
224error: 224error:
225 if (root)
226 iput(root);
227
228 mutex_lock(&vc->vc_mutex); 225 mutex_lock(&vc->vc_mutex);
229 bdi_destroy(&vc->bdi); 226 bdi_destroy(&vc->bdi);
230 vc->vc_sb = NULL; 227 vc->vc_sb = NULL;