orangefs: double iput() in case of d_make_root() failure
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 9 Oct 2015 00:18:00 +0000 (20:18 -0400)
committerMike Marshall <hubcap@omnibond.com>
Fri, 13 Nov 2015 16:38:51 +0000 (11:38 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/super.c

index 9dee952935990705a04053e4a135c3a1d3f187d2..833af68c2227ae1059ba9fa8c165766d684c7567 100644 (file)
@@ -403,10 +403,8 @@ static int pvfs2_fill_sb(struct super_block *sb, void *data, int silent)
 
        /* allocates and places root dentry in dcache */
        root_dentry = d_make_root(root);
-       if (!root_dentry) {
-               iput(root);
+       if (!root_dentry)
                return -ENOMEM;
-       }
 
        sb->s_export_op = &pvfs2_export_ops;
        sb->s_root = root_dentry;