summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-06-11 18:02:02 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-07-27 18:03:59 +0900
commit4e423832a675af671eab9d8a3d96636aa63faa9e (patch)
tree93991c49ed9e8eddd509544f35d8e55f8af1b461 /fs/f2fs/super.c
parent4cac90d5491c9a157909b9d45128997d35624e01 (diff)
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 <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c2
1 files changed, 1 insertions, 1 deletions
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 */