diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-02-13 03:15:58 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-21 02:29:34 +0100 |
commit | f56b0fbc6477e50303a503ee1453ed94e20f154a (patch) | |
tree | 633b2f01e678cf519012377492b28b96e5273da1 /fs/coda | |
parent | clean up the failure exits in cifs_read_super() (diff) | |
download | linux-f56b0fbc6477e50303a503ee1453ed94e20f154a.tar.xz linux-f56b0fbc6477e50303a503ee1453ed94e20f154a.zip |
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.c | 5 |
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) if (IS_ERR(root)) { error = PTR_ERR(root); printk("Failure of coda_cnode_make for root: error %d\n", error); - root = NULL; 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); sb->s_root = d_alloc_root(root); if (!sb->s_root) { + iput(root); error = -EINVAL; goto error; } return 0; error: - if (root) - iput(root); - mutex_lock(&vc->vc_mutex); bdi_destroy(&vc->bdi); vc->vc_sb = NULL; |