提交 8c58f02e 编写于 作者: G Guoqing Jiang 提交者: NeilBrown

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: NGuoqing Jiang <gqjiang@suse.com>
Signed-off-by: NGoldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: NNeilBrown <neilb@suse.de>
上级 124eb761
...@@ -612,9 +612,9 @@ static int join(struct mddev *mddev, int nodes) ...@@ -612,9 +612,9 @@ static int join(struct mddev *mddev, int nodes)
if (ret) if (ret)
goto err; goto err;
wait_for_completion(&cinfo->completion); wait_for_completion(&cinfo->completion);
if (nodes <= cinfo->slot_number) { if (nodes < cinfo->slot_number) {
pr_err("md-cluster: Slot allotted(%d) greater than available slots(%d)", cinfo->slot_number - 1, pr_err("md-cluster: Slot allotted(%d) is greater than available slots(%d).",
nodes); cinfo->slot_number, nodes);
ret = -ERANGE; ret = -ERANGE;
goto err; goto err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册