提交 f4f9fc29 编写于 作者: C Christoph Hellwig 提交者: Jens Axboe

nvme: fix the nsid value to print in nvme_validate_or_alloc_ns

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: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 d4b64fd7
...@@ -4099,7 +4099,7 @@ static void nvme_validate_or_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid) ...@@ -4099,7 +4099,7 @@ static void nvme_validate_or_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
if (!nvme_multi_css(ctrl)) { if (!nvme_multi_css(ctrl)) {
dev_warn(ctrl->device, dev_warn(ctrl->device,
"command set not reported for nsid: %d\n", "command set not reported for nsid: %d\n",
ns->head->ns_id); nsid);
break; break;
} }
nvme_alloc_ns(ctrl, nsid, &ids); nvme_alloc_ns(ctrl, nsid, &ids);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册