[PATCH 5/5] nvmet: return invalid filed when check fctype fails
Guixin Liu
kanie at linux.alibaba.com
Tue Dec 12 22:32:52 PST 2023
Return invalid filed status code when check fctype fails in
nvmet_parse_connect_cmd().
Signed-off-by: Guixin Liu <kanie at linux.alibaba.com>
---
drivers/nvme/target/fabrics-cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c
index 9cffb64..d6e6db2 100644
--- a/drivers/nvme/target/fabrics-cmd.c
+++ b/drivers/nvme/target/fabrics-cmd.c
@@ -361,7 +361,7 @@ u16 nvmet_parse_connect_cmd(struct nvmet_req *req)
pr_debug("invalid capsule type 0x%x on unconnected queue.\n",
cmd->fabrics.fctype);
req->error_loc = offsetof(struct nvmf_common_command, fctype);
- return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
+ return NVME_SC_INVALID_FIELD | NVME_SC_DNR;
}
if (cmd->connect.qid == 0)
--
1.8.3.1
More information about the Linux-nvme
mailing list