summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGuoqing Jiang <gqjiang@suse.com>2015-04-21 18:25:52 +0200
committerNeilBrown <neilb@suse.de>2015-04-21 23:58:31 +0200
commit8c58f02e244d5b35fa38aa308007715d4957d4c7 (patch)
tree4226fcf47099fa434aafd9efd3a1a2ad62d8e0a2 /drivers
parentmd: Fix bitmap offset calculations (diff)
downloadlinux-8c58f02e244d5b35fa38aa308007715d4957d4c7.tar.xz
linux-8c58f02e244d5b35fa38aa308007715d4957d4c7.zip
md-cluster: correct the num for comparison
Since the node num of md-cluster is from zero, and cinfo->slot_number represents the slot num of dlm, no need to check for equality. Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/md-cluster.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
index ae8bb547f94d..10c44a3a9d6a 100644
--- a/drivers/md/md-cluster.c
+++ b/drivers/md/md-cluster.c
@@ -612,9 +612,9 @@ static int join(struct mddev *mddev, int nodes)
if (ret)
goto err;
wait_for_completion(&cinfo->completion);
- if (nodes <= cinfo->slot_number) {
- pr_err("md-cluster: Slot allotted(%d) greater than available slots(%d)", cinfo->slot_number - 1,
- nodes);
+ if (nodes < cinfo->slot_number) {
+ pr_err("md-cluster: Slot allotted(%d) is greater than available slots(%d).",
+ cinfo->slot_number, nodes);
ret = -ERANGE;
goto err;
}