btrfs: return actual error on btrfs_init_sysfs
PATCH 16/24 btrfs: return actual error on btrfs_init_sysfs
From: Jie Liu <[email protected]>
Return the actual error code if call kset_create_and_add() failed
Cc Chris Mason <[email protected]>
Cc Josef Bacik <[email protected]>
Signed-off-by Jie Liu <[email protected]>
--- fs/btrfs/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/sysfs.c +2 -2
@@ -705,8 +705,8 @@ int btrfs_init_sysfs(void)int ret; btrfs_kset =kset_create_and_add ("btrfs" ,NULL , fs_kobj); -if (!btrfs_kset) -return -ENOMEM ; +if (IS_ERR (btrfs_kset)) +return PTR_ERR (btrfs_kset); ret =btrfs_init_debugfs ();if (ret)
Signature · 1 line
1.8.3.2
Hi,
Quoted 7 lines · Jeff Liu
From: Jie Liu <[email protected]>
Return the actual error code if call
kset_create_and_add()failedCc Chris Mason <[email protected]>Cc Josef Bacik <[email protected]>Signed-off-by Jie Liu <[email protected]>
Please ignore this patch because Greg think that is incorrect.
Cheers,
-Jeff