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 <cgxu...@gmx.com>
---
 fs/f2fs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index c46a1d4318d4..d92d4508f262 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -3288,7 +3288,7 @@ static int f2fs_fill_super(struct super_block *sb, void 
*data, int silent)
        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);
-- 
2.20.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to