From 4e423832a675af671eab9d8a3d96636aa63faa9e Mon Sep 17 00:00:00 2001 From: Chao Yu Date: Mon, 11 Jun 2018 18:02:02 +0800 Subject: 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: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/f2fs/super.c') diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 89a347243e9a..01d1cb6081fc 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2911,7 +2911,7 @@ try_onemore: 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 */ -- cgit v1.2.3