Commit 40244ad3 authored by Chaitanya Kulkarni's avatar Chaitanya Kulkarni Committed by Christoph Hellwig
Browse files

nvmet: set status to 0 in case for invalid nsid



For unallocated namespace in nvmet_execute_identify_ns() don't set the
status to NVME_SC_INVALID_NS, set it to zero.

Fixes: bffcd507 ("nvmet: set right status on error in id-ns handler")
Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent b5df8e79
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -485,7 +485,7 @@ static void nvmet_execute_identify_ns(struct nvmet_req *req)
	/* return an all zeroed buffer if we can't find an active namespace */
	/* return an all zeroed buffer if we can't find an active namespace */
	req->ns = nvmet_find_namespace(ctrl, req->cmd->identify.nsid);
	req->ns = nvmet_find_namespace(ctrl, req->cmd->identify.nsid);
	if (!req->ns) {
	if (!req->ns) {
		status = NVME_SC_INVALID_NS;
		status = 0;
		goto done;
		goto done;
	}
	}