diff mbox

[16/24] btrfs: return actual error on btrfs_init_sysfs

Message ID 53A0516D.5040607@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

jeff.liu June 17, 2014, 2:32 p.m. UTC
From: Jie Liu <jeff.liu@oracle.com>

Return the actual error code if call kset_create_and_add() failed

Cc: Chris Mason <clm@fb.com>
Cc: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
 fs/btrfs/sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

jeff.liu June 18, 2014, 1:52 a.m. UTC | #1
Hi,

On 06/17/2014 22:32 PM, Jeff Liu wrote:
> From: Jie Liu <jeff.liu@oracle.com>
> 
> Return the actual error code if call kset_create_and_add() failed
> 
> Cc: Chris Mason <clm@fb.com>
> Cc: Josef Bacik <jbacik@fb.com>
> Signed-off-by: Jie Liu <jeff.liu@oracle.com>

Please ignore this patch because Greg think that is incorrect.


Cheers,
-Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index df39458..8f7dfa7 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -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)