Commit 034f5403 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Zheng Zengkai
Browse files

nvme: fix the nsid value to print in nvme_validate_or_alloc_ns



stable inclusion
from stable-5.10.27
commit f12d05f70282df0af59ee891f5cbfe147c1d9a41
bugzilla: 51493

--------------------------------

commit f4f9fc29 upstream.

ns can be NULL at this point, and my move of the check from
the original patch by Chaitanya broke this.

Fixes: 0ec84df4 ("nvme-core: check ctrl css before setting up zns")
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatar&nbsp; Weilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 4ccc1453
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4022,7 +4022,7 @@ static void nvme_validate_or_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
		if (!nvme_multi_css(ctrl)) {
			dev_warn(ctrl->device,
				"command set not reported for nsid: %d\n",
				ns->head->ns_id);
				nsid);
			break;
		}
		nvme_alloc_ns(ctrl, nsid, &ids);