diff options
author | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2023-03-15 19:59:37 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-11 23:03:22 +0900 |
commit | fd95ae3bb8a6b427bd1d4fd1cda64c535eff0a67 (patch) | |
tree | bab66fc3e530bfa541d5130f001c1afcadf3b1a9 /drivers/nvme | |
parent | 4898a8d6b16b49d78af14c9db78ef95e749cad46 (diff) | |
download | linux-stable-fd95ae3bb8a6b427bd1d4fd1cda64c535eff0a67.tar.gz linux-stable-fd95ae3bb8a6b427bd1d4fd1cda64c535eff0a67.tar.bz2 linux-stable-fd95ae3bb8a6b427bd1d4fd1cda64c535eff0a67.zip |
nvmet: fix Identify Active Namespace ID list handling
[ Upstream commit 97416f67d55fb8b866ff1815ca7ef26b6dfa6a5e ]
The identify command with cns set to NVME_ID_CNS_NS_ACTIVE_LIST does
not depend on the command set. The execution of this command should
thus not look at the csi field specified in the command. Simplify
nvmet_execute_identify() to directly call
nvmet_execute_identify_nslist() without the csi switch-case.
Fixes: ab5d0b38c047 ("nvmet: add Command Set Identifier support")
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Tested-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/target/admin-cmd.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c index ea7ad4617f6e..d414269756c8 100644 --- a/drivers/nvme/target/admin-cmd.c +++ b/drivers/nvme/target/admin-cmd.c @@ -719,13 +719,8 @@ static void nvmet_execute_identify(struct nvmet_req *req) } break; case NVME_ID_CNS_NS_ACTIVE_LIST: - switch (req->cmd->identify.csi) { - case NVME_CSI_NVM: - return nvmet_execute_identify_nslist(req); - default: - break; - } - break; + nvmet_execute_identify_nslist(req); + return; case NVME_ID_CNS_NS_DESC_LIST: if (nvmet_handle_identify_desclist(req) == true) return; |