summaryrefslogtreecommitdiff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-10-29 09:13:04 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2015-12-04 11:52:33 -0800
commit787c7b8cb3c5196f77e4682e0b1c71375e74822c (patch)
treefc4d95e9b7f37c0095fb9adb4337bcb89a1da1da /fs/f2fs/super.c
parentfb39cbda147082a2e7dc4e2b5f3298448295e3c4 (diff)
f2fs: report error of f2fs_create_root_stats
f2fs_create_root_stats can fail due to no memory, report it to user. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 3a65e0132352..67864ab376c8 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1478,10 +1478,14 @@ static int __init init_f2fs_fs(void)
err = register_filesystem(&f2fs_fs_type);
if (err)
goto free_shrinker;
- f2fs_create_root_stats();
+ err = f2fs_create_root_stats();
+ if (err)
+ goto free_filesystem;
f2fs_proc_root = proc_mkdir("fs/f2fs", NULL);
return 0;
+free_filesystem:
+ unregister_filesystem(&f2fs_fs_type);
free_shrinker:
unregister_shrinker(&f2fs_shrinker_info);
free_crypto: