summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>2021-02-10 06:47:52 +0100
committerChristoph Hellwig <hch@lst.de>2021-02-10 16:38:04 +0100
commit40244ad36bcfb796a6bb9e95bdcbf8ddf3134509 (patch)
tree792a01cc42f506d2fa4982c01b61cf3fd71dc187 /drivers
parentnvmet-fc: add a missing __rcu annotation to nvmet_fc_tgt_assoc.queues (diff)
downloadlinux-40244ad36bcfb796a6bb9e95bdcbf8ddf3134509.tar.xz
linux-40244ad36bcfb796a6bb9e95bdcbf8ddf3134509.zip
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: bffcd507780e ("nvmet: set right status on error in id-ns handler") Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvme/target/admin-cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 613a4d8feac1..5070ea5cf260 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -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 */
req->ns = nvmet_find_namespace(ctrl, req->cmd->identify.nsid);
if (!req->ns) {
- status = NVME_SC_INVALID_NS;
+ status = 0;
goto done;
}