From: Jie Liu <[email protected]>

Return the actual error code if kset_create_and_add() failed

Cc: Jaegeuk Kim <[email protected]>
Cc: Changman Lee <[email protected]>
Signed-off-by: Jie Liu <[email protected]>
---
 fs/f2fs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index b2b1863..74470cb 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1175,8 +1175,8 @@ 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) {
-               err = -ENOMEM;
+       if (IS_ERR(f2fs_kset)) {
+               err = PTR_ERR(f2fs_kset);
                goto free_checkpoint_caches;
        }
        err = register_filesystem(&f2fs_fs_type);
-- 
1.8.3.2

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to