Skip to contentSkip to conversation

f2fs: return actual error on init_f2fs_fs

PATCH Applied Jeff Liu 1 participant 2 messages Jun 17, 2014 – Jun 18, 2014 F2FS file system

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

PATCH 21/24 f2fs: return actual error on init_f2fs_fs

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]>
---
 fs/f2fs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/f2fs/super.c +2 -2
index b2b1863..74470cb 100644
@@ -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);
Signature · 8 lines
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
author
#1 lore raw

Hi,

Quoted 7 lines · Jeff Liu

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]>

Please ignore this patch because Greg think that is incorrect.

Cheers,
-Jeff

------------------------------------------------------------------------------
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