From patchwork Tue Sep 15 14:12:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 263995 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE4C8C43461 for ; Tue, 15 Sep 2020 14:36:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2C0820829 for ; Tue, 15 Sep 2020 14:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600180605; bh=/RTeKqlM4eEKvHgTozSYnhVsgFdlsZhU8zbzBPsVOYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=BWV1+a/dsNqzNCCSGqn1dN2Qr8RQtos5rBImM65mt5exVlFfD/OnnqnF9Q4vf3Onv 7anQ7m5TWhLbKRdisxOUijgM67rRWYNDP9POVYAPv57yITI1xUxyPxJfulBPP7aoyz GWnXthGuSoJk90RP+631L+sfJFlnOGLjwhzm/WMI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727154AbgIOOgN (ORCPT ); Tue, 15 Sep 2020 10:36:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:47652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727047AbgIOOfX (ORCPT ); Tue, 15 Sep 2020 10:35:23 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E036B221F0; Tue, 15 Sep 2020 14:15:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600179356; bh=/RTeKqlM4eEKvHgTozSYnhVsgFdlsZhU8zbzBPsVOYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HPB5yjWx4f0JHUeEgfY8drybgLDaZB5PHjuf41V6U2cK3P+3v5gYL8H32iYjGwBYL YxddPa4Xmk8d/Z+huFnYJSvlVw+F0ykDB1zhPnJPNcMcdxX0Vq8AAP+GYRXK1FtnkB XuaNF/SH3x7rEe2ut52h/avy0o5aUJoOx7hPfs9o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , Sagi Grimberg , Sasha Levin Subject: [PATCH 4.19 27/78] nvme-fabrics: dont check state NVME_CTRL_NEW for request acceptance Date: Tue, 15 Sep 2020 16:12:52 +0200 Message-Id: <20200915140634.935645366@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915140633.552502750@linuxfoundation.org> References: <20200915140633.552502750@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Sagi Grimberg [ 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 Signed-off-by: Sagi Grimberg Signed-off-by: Sasha Levin --- drivers/nvme/host/fabrics.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c index bcd09d3a44dad..05dd46f984414 100644 --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c @@ -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)