summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-06-11 18:02:02 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-09-18 13:36:04 -0700
commit8e900c803dcd868f3e7278bf5ddb2a2a2b14ec62 (patch)
tree5eac5fab52244d3f646b23a37e5e202ac33cfc3e
parent09271307a2e7bf77694908a496954518ea821c61 (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>
-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 e7045117042b..f91c0d84bb17 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2919,7 +2919,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 */