nvmet: fix Identify Identification Descriptor List handling
authorChristoph Hellwig <hch@lst.de>
Wed, 15 Mar 2023 14:13:35 +0000 (15:13 +0100)
committerChristoph Hellwig <hch@lst.de>
Thu, 13 Apr 2023 06:55:04 +0000 (08:55 +0200)
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 <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/nvme/target/admin-cmd.c

index 3c4f2ddc09604ec5f447f3e09091b656094eca82..c0908031ce25ee3c0a5b3cc622c23053e5a4717b 100644 (file)
@@ -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) {