提交 6e6b978c 编写于 作者: W Wei Yongjun 提交者: Jaegeuk Kim

f2fs: fix error return code in init_f2fs_fs()

Fix to return -ENOMEM in the kset create and add error handling
case instead of 0, as done elsewhere in this function.

Introduced by commit b59d0bae.
(f2fs: add sysfs support for controlling the gc_thread)
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: NNamjae Jeon <namjae.jeon@samsung.com>
[Jaegeuk Kim: merge the patch with previous modification]
Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
上级 d59ff4df
......@@ -1012,8 +1012,10 @@ static int __init init_f2fs_fs(void)
if (err)
goto free_gc_caches;
f2fs_kset = kset_create_and_add("f2fs", NULL, fs_kobj);
if (!f2fs_kset)
if (!f2fs_kset) {
err = -ENOMEM;
goto free_checkpoint_caches;
}
err = register_filesystem(&f2fs_fs_type);
if (err)
goto free_kset;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册