[PATCH 1/2] nvmet: fix Identify Identification Descriptor List handling
Christoph Hellwig
hch at lst.de
Wed Mar 15 07:20:31 PDT 2023
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 at lst.de>
---
drivers/nvme/target/admin-cmd.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 3c4f2ddc09604e..c0908031ce25ee 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -668,23 +668,6 @@ static void nvmet_execute_identify_desclist(struct nvmet_req *req)
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) {
--
2.39.2
More information about the Linux-nvme
mailing list