]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
nvme-fabrics: don't check state NVME_CTRL_NEW for request acceptance
authorSagi Grimberg <sagi@grimberg.me>
Fri, 14 Aug 2020 18:46:51 +0000 (11:46 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:46:42 +0000 (14:46 +0100)
BugLink: https://bugs.launchpad.net/bugs/1896824
[ Upstream commit d7144f5c4cf4de95fdc3422943cf51c06aeaf7a7 ]

NVME_CTRL_NEW should never see any I/O, because in order to start
initialization it has to transition to NVME_CTRL_CONNECTING and from
there it will never return to this state.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: William Breathitt Gray <william.gray@canonical.com>
drivers/nvme/host/fabrics.c

index aa8d0805ba1488cf0448e7553fa6db7cd55be1f4..3bb71f177dfda24f11e1884ddb8d2c55c11f6d00 100644 (file)
@@ -580,7 +580,6 @@ bool __nvmf_check_ready(struct nvme_ctrl *ctrl, struct request *rq,
         * which is require to set the queue live in the appropinquate states.
         */
        switch (ctrl->state) {
-       case NVME_CTRL_NEW:
        case NVME_CTRL_CONNECTING:
                if (blk_rq_is_passthrough(rq) && nvme_is_fabrics(req->cmd) &&
                    req->cmd->fabrics.fctype == nvme_fabrics_type_connect)