linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
To: linux-raid@vger.kernel.org
Cc: neilb@suse.com, Goldwyn Rodrigues <rgoldwyn@suse.com>
Subject: [PATCH 1/3] Return error if request_module fails and returns positive value
Date: Wed, 22 Jul 2015 12:09:15 -0500	[thread overview]
Message-ID: <1437584957-23879-1-git-send-email-rgoldwyn@suse.com> (raw)

request_module() can return 256 (process exited) in some cases,
which is not as specified in the documentation before the
request_module() definition. Convert the error to -ENOENT.

This fixes edb39c9deda8 ("Introduce md_cluster_operations to
handle cluster functions")

Signed-off-By: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
 drivers/md/md.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index d429c30..7a7870f 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7437,7 +7437,7 @@ int md_setup_cluster(struct mddev *mddev, int nodes)
 	err = request_module("md-cluster");
 	if (err) {
 		pr_err("md-cluster module not found.\n");
-		return err;
+		return -ENOENT;
 	}
 
 	spin_lock(&pers_lock);
-- 
2.1.4


             reply	other threads:[~2015-07-22 17:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22 17:09 Goldwyn Rodrigues [this message]
2015-07-22 17:09 ` [PATCH 2/3] Skip cluster setup in case of error while reading bitmap Goldwyn Rodrigues
2015-07-22 17:09 ` [PATCH 3/3] Skip cluster setup for dm-raid Goldwyn Rodrigues
2015-07-22 23:21   ` NeilBrown

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=1437584957-23879-1-git-send-email-rgoldwyn@suse.com \
    --to=rgoldwyn@suse.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.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).