f2fs: jump to label 'free_node_inode' when failing from d_make_root()
authorChengguang Xu <cgxu519@gmx.com>
Wed, 23 Jan 2019 07:49:44 +0000 (15:49 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 6 Mar 2019 03:58:06 +0000 (19:58 -0800)
When sb->s_root is NULL dput() will do nothing,
so jump to label 'free_node_inode' instead of lable
'free_root_inode' when failing from d_make_root().

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c

index e382be2f10f95f76d6a397f5ff37b44c70993ff5..83bbe7424fc1e19a1a165352860a70a38bc6a421 100644 (file)
@@ -3322,7 +3322,7 @@ try_onemore:
        sb->s_root = d_make_root(root); /* allocate root dentry */
        if (!sb->s_root) {
                err = -ENOMEM;
-               goto free_root_inode;
+               goto free_node_inode;
        }
 
        err = f2fs_register_sysfs(sbi);