diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-02-12 21:06:12 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-20 21:29:33 -0400 |
commit | 064326c0773af8a0e8bb82d895cceaedc8a51b9e (patch) | |
tree | 572cb5c160580f5c9ab91bb5ac42d53d0a0f0cdd /fs/cifs/cifsfs.c | |
parent | 9bcb4b733c22b7dbc4cf847e707ac98f751e9180 (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/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 5 |
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) if (IS_ERR(inode)) { rc = PTR_ERR(inode); - inode = NULL; goto out_no_root; } @@ -127,6 +126,7 @@ cifs_read_super(struct super_block *sb) if (!sb->s_root) { rc = -ENOMEM; + iput(inode); goto out_no_root; } @@ -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; } |