]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 11:45:25 +0000 (13:45 +0200)
[ 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>
drivers/nvme/host/fabrics.c

index bcd09d3a44dad5cf0d8d99de5c96f25a1aa1ff84..05dd46f98441448799516c76a0d5ab7c80fb5001 100644 (file)
@@ -577,7 +577,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 (req->cmd->common.opcode == nvme_fabrics_command &&
                    req->cmd->fabrics.fctype == nvme_fabrics_type_connect)