Skip to content

Commit

Permalink
clean up the failure exits in cifs_read_super()
Browse files Browse the repository at this point in the history
no need to make that iput() conditional, just take it to the right place...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Mar 21, 2012
1 parent 9bcb4b7 commit 064326c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ cifs_read_super(struct super_block *sb)

if (IS_ERR(inode)) {
rc = PTR_ERR(inode);
inode = NULL;
goto out_no_root;
}

sb->s_root = d_alloc_root(inode);

if (!sb->s_root) {
rc = -ENOMEM;
iput(inode);
goto out_no_root;
}

Expand All @@ -147,9 +147,6 @@ cifs_read_super(struct super_block *sb)

out_no_root:
cERROR(1, "cifs_read_super: get root inode failed");
if (inode)
iput(inode);

return rc;
}

Expand Down

0 comments on commit 064326c

Please sign in to comment.