Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c58f02e authored by Guoqing Jiang's avatar Guoqing Jiang Committed by NeilBrown
Browse files

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: default avatarGuoqing Jiang <gqjiang@suse.com>
Signed-off-by: default avatarGoldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 124eb761
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
	}