From 2f17f42c7f52a34abff2c92766806b58ea142c23 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 15 Mar 2023 15:13:35 +0100 Subject: nvmet: fix Identify Identification Descriptor List handling The Identification Descriptor List CNS value does not check the CSI value, so remove the code trying to handle it. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Damien Le Moal --- drivers/nvme/target/admin-cmd.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'drivers/nvme') diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c index 3c4f2ddc0960..c0908031ce25 100644 --- a/drivers/nvme/target/admin-cmd.c +++ b/drivers/nvme/target/admin-cmd.c @@ -668,23 +668,6 @@ out: nvmet_req_complete(req, status); } -static bool nvmet_handle_identify_desclist(struct nvmet_req *req) -{ - switch (req->cmd->identify.csi) { - case NVME_CSI_NVM: - nvmet_execute_identify_desclist(req); - return true; - case NVME_CSI_ZNS: - if (IS_ENABLED(CONFIG_BLK_DEV_ZONED)) { - nvmet_execute_identify_desclist(req); - return true; - } - return false; - default: - return false; - } -} - static void nvmet_execute_identify_ctrl_nvm(struct nvmet_req *req) { /* Not supported: return zeroes */ @@ -708,8 +691,7 @@ static void nvmet_execute_identify(struct nvmet_req *req) nvmet_execute_identify_nslist(req); return; case NVME_ID_CNS_NS_DESC_LIST: - if (nvmet_handle_identify_desclist(req) == true) - return; + nvmet_execute_identify_desclist(req); break; case NVME_ID_CNS_CS_NS: switch (req->cmd->identify.csi) { -- cgit v1.2.3