提交 4e423832 编写于 作者: C Chao Yu 提交者: Jaegeuk Kim

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: NChao Yu <yuchao0@huawei.com>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 4cac90d5
...@@ -2911,7 +2911,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -2911,7 +2911,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) { if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) {
iput(root); iput(root);
err = -EINVAL; err = -EINVAL;
goto free_node_inode; goto free_stats;
} }
sb->s_root = d_make_root(root); /* allocate root dentry */ sb->s_root = d_make_root(root); /* allocate root dentry */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册