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>
This commit is contained in:
@@ -208,7 +208,6 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
|
|||||||
if (IS_ERR(root)) {
|
if (IS_ERR(root)) {
|
||||||
error = PTR_ERR(root);
|
error = PTR_ERR(root);
|
||||||
printk("Failure of coda_cnode_make for root: error %d\n", error);
|
printk("Failure of coda_cnode_make for root: error %d\n", error);
|
||||||
root = NULL;
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,15 +215,13 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
|
|||||||
root->i_ino, root->i_sb->s_id);
|
root->i_ino, root->i_sb->s_id);
|
||||||
sb->s_root = d_alloc_root(root);
|
sb->s_root = d_alloc_root(root);
|
||||||
if (!sb->s_root) {
|
if (!sb->s_root) {
|
||||||
|
iput(root);
|
||||||
error = -EINVAL;
|
error = -EINVAL;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (root)
|
|
||||||
iput(root);
|
|
||||||
|
|
||||||
mutex_lock(&vc->vc_mutex);
|
mutex_lock(&vc->vc_mutex);
|
||||||
bdi_destroy(&vc->bdi);
|
bdi_destroy(&vc->bdi);
|
||||||
vc->vc_sb = NULL;
|
vc->vc_sb = NULL;
|
||||||
|
Reference in New Issue
Block a user