aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/debug.c
diff options
context:
space:
mode:
authorGravatar Chao Yu <chao2.yu@samsung.com> 2015-10-29 09:13:04 +0800
committerGravatar Jaegeuk Kim <jaegeuk@kernel.org> 2015-12-04 11:52:33 -0800
commit787c7b8cb3c5196f77e4682e0b1c71375e74822c (patch)
treefc4d95e9b7f37c0095fb9adb4337bcb89a1da1da /fs/f2fs/debug.c
parentMerge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadlinux-787c7b8cb3c5196f77e4682e0b1c71375e74822c.tar.gz
linux-787c7b8cb3c5196f77e4682e0b1c71375e74822c.tar.bz2
linux-787c7b8cb3c5196f77e4682e0b1c71375e74822c.zip
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/debug.c')
-rw-r--r--fs/f2fs/debug.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index 478e5d54154f..b0966f3b1c9a 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -406,20 +406,23 @@ void f2fs_destroy_stats(struct f2fs_sb_info *sbi)
kfree(si);
}
-void __init f2fs_create_root_stats(void)
+int __init f2fs_create_root_stats(void)
{
struct dentry *file;
f2fs_debugfs_root = debugfs_create_dir("f2fs", NULL);
if (!f2fs_debugfs_root)
- return;
+ return -ENOMEM;
file = debugfs_create_file("status", S_IRUGO, f2fs_debugfs_root,
NULL, &stat_fops);
if (!file) {
debugfs_remove(f2fs_debugfs_root);
f2fs_debugfs_root = NULL;
+ return -ENOMEM;
}
+
+ return 0;
}
void f2fs_destroy_root_stats(void)