From: Chao Yu Date: Mon, 11 Jun 2018 10:02:02 +0000 (+0800) Subject: f2fs: fix error path of fill_super X-Git-Tag: android-x86-8.1-r1~394^2~79 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4e423832a675af671eab9d8a3d96636aa63faa9e;p=android-x86%2Fkernel.git 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 --- 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 */