diff options
author | Amit Engel <amit.engel@dell.com> | 2021-08-08 18:06:15 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-08-16 14:42:25 +0200 |
commit | b71df12605cabab47d58bd926badaf4130280e4d (patch) | |
tree | f05ea4b71f2d1cddc3a09c52db95940f0920bcef /drivers/nvme/target/core.c | |
parent | e804d5abe2d74cfe23f5f83be580d1cdc9307111 (diff) | |
download | linux-b71df12605cabab47d58bd926badaf4130280e4d.tar.bz2 |
nvmet: avoid duplicate qid in connect cmd
According to the NVMe specification, if the host sends a Connect command
specifying a queue id which has already been created, a status value of
NVME_SC_CMD_SEQ_ERROR is returned.
Signed-off-by: Amit Engel <amit.engel@dell.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/core.c')
-rw-r--r-- | drivers/nvme/target/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index ac7210a3ea1c..66d05eecc2a9 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c @@ -802,6 +802,7 @@ void nvmet_sq_destroy(struct nvmet_sq *sq) * controller teardown as a result of a keep-alive expiration. */ ctrl->reset_tbkas = true; + sq->ctrl->sqs[sq->qid] = NULL; nvmet_ctrl_put(ctrl); sq->ctrl = NULL; /* allows reusing the queue later */ } |