ocfs2: return actual error on sysfs functions
PATCH 22/24 ocfs2: return actual error on sysfs functions
From: Jie Liu <[email protected]>
Return the actual error code if kset_create_and_add() failed
Cc Mark Fasheh <[email protected]>
Cc Joel Becker <[email protected]>
Cc Andrew Morton <[email protected]>
Signed-off-by Jie Liu <[email protected]>
--- fs/ocfs2/cluster/sys.c | 4 ++-- fs/ocfs2/stackglue.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
fs/ocfs2/cluster/sys.c +2 -2
@@ -65,8 +65,8 @@ int o2cb_sys_init(void)int ret; o2cb_kset =kset_create_and_add ("o2cb" ,NULL , fs_kobj); -if (!o2cb_kset) -return -ENOMEM ; +if (IS_ERR (o2cb_kset)) +return PTR_ERR (o2cb_kset); ret =sysfs_create_group (&o2cb_kset->kobj, &o2cb_attr_group);if (ret)
fs/ocfs2/stackglue.c +2 -2
@@ -641,8 +641,8 @@ static int ocfs2_sysfs_init(void)int ret; ocfs2_kset =kset_create_and_add ("ocfs2" ,NULL , fs_kobj); -if (!ocfs2_kset) -return -ENOMEM ; +if (IS_ERR (ocfs2_kset)) +return PTR_ERR (ocfs2_kset); ret =sysfs_create_group (&ocfs2_kset->kobj, &ocfs2_attr_group);if (ret)
Signature · 1 line
1.8.3.2
PATCH 22/24 ocfs2: return actual error on sysfs functions
Hi,
Quoted 8 lines · Jeff Liu
From: Jie Liu <[email protected]>
Return the actual error code if
kset_create_and_add()failedCc Mark Fasheh <[email protected]>Cc Joel Becker <[email protected]>Cc Andrew Morton <[email protected]>Signed-off-by Jie Liu <[email protected]>
Please ignore this patch because Greg think that is incorrect.
Cheers,
-Jeff