1
0
Fork 0

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>
hifive-unleashed-5.1
Guoqing Jiang 2015-04-21 11:25:52 -05:00 committed by NeilBrown
parent 124eb761ed
commit 8c58f02e24
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}