Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe457985 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

f2fs: fix error path of fill_super



In fill_super, if root inode's attribute is incorrect, we need to
call f2fs_destroy_stats to release stats memory.

Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent ea4a8089
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2915,7 +2915,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
	if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) {
		iput(root);
		err = -EINVAL;
		goto free_node_inode;
		goto free_stats;
	}

	sb->s_root = d_make_root(root); /* allocate root dentry */