From: Jeff Liu <jeff.liu@oracle.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 19/24] fs/dlm: return actual error on dlm_lockspace_init
Date: Tue, 17 Jun 2014 22:31:56 +0800 [thread overview]
Message-ID: <53A0515C.8040702@oracle.com> (raw)
From: Jie Liu <jeff.liu@oracle.com>
Return the actual error code if call kset_create_and_add() failed
Cc: Christine Caulfield <ccaulfie@redhat.com>
Cc: David Teigland <teigland@redhat.com>
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
fs/dlm/lockspace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index f3e7278..b0909c6 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -245,9 +245,9 @@ int __init dlm_lockspace_init(void)
spin_lock_init(&lslist_lock);
dlm_kset = kset_create_and_add("dlm", &dlm_uevent_ops, kernel_kobj);
- if (!dlm_kset) {
+ if (IS_ERR(dlm_kset)) {
printk(KERN_WARNING "%s: can not create kset\n", __func__);
- return -ENOMEM;
+ return PTR_ERR(dlm_kset);
}
return 0;
}
--
1.8.3.2
reply other threads:[~2014-06-17 14:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53A0515C.8040702@oracle.com \
--to=jeff.liu@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).