Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp451939pxb; Thu, 9 Sep 2021 04:56:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgCC5Op1orX34MceAl8TYQTOjYf7G6fWyyrXMcbhNDk4uMUBjG9iCEE248I4PmGru1lsYr X-Received: by 2002:a6b:c8c7:: with SMTP id y190mr2284879iof.210.1631188566565; Thu, 09 Sep 2021 04:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631188566; cv=none; d=google.com; s=arc-20160816; b=h1uG7fFmT6HAiDLUygZn8gEHE5tCG/mtdFy7J5pgQxHa+7wsYcfOWP8unujAL6clyv CE3+H+yXLSvOmS4uBAP7wGXlDrRq4qxSw9LA6921GMUy0UT+N28H8ulPsOAWuYdCb4lP Ophm8D8im94HVlRxS01KIbAgJC1fmAnKqcinS7Op1QYPgT57reC7QFd6g3v+AkxFvZ9l 4CGGFiC5zA1JEl2470MRRD7Tpx5KRT+lIWzAVu3fnWP3E/HAkxLwJhX90yWkbvlj2EtI k3TVaEJH9AojTWu9xUHjfrSVFcPuxi/nQr9kEVLo2TFCgRsdS4zzRVousx3rxIamjqru +Jyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZrSBjKsb7qZQPNmlKSgUjdRd3uhjxbingXl4c7Gpyww=; b=y85nMLFhIgOwtO7+DAlE7kN/yVkM1Sx1RMskglQC2Jypfg+h3V01p6A6SnH4QSpw7q A/ZBV+pGjXK24xJFerIlyJ8zHAWdDX/x59HvHRsL9JsLd2JiXIToE5w9npdog3tTeGsy 0khhJ7Ny0RkcR/kpdbsV5enukfqdv+qXo7a9foCTWNhyt6YIe5CrszaErZMYuXspVNYs eCIEHLiOyVkszsjk7CGjgKr20OuWAGRKEmTOV4q43No2A5xXTzbTLbAFbU8+35yS7Bm9 U+pyyJDwA0LU1loptD9w5YICCzIXOHhgDvqV9LHur+Dr5DaD5GIOoqkK2QxKhYz6c1SF LZJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YX6SpFo4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i12si1578520jac.26.2021.09.09.04.55.55; Thu, 09 Sep 2021 04:56:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YX6SpFo4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243845AbhIIL4T (ORCPT + 99 others); Thu, 9 Sep 2021 07:56:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:55360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242995AbhIILxD (ORCPT ); Thu, 9 Sep 2021 07:53:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E496361362; Thu, 9 Sep 2021 11:44:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187871; bh=6oZCUpyxr2EJT7JalbSNKJm7FX02wo6SvZ2McfbqLOg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YX6SpFo425SHwRrvqTZLrGSgY+Fl80Oa4MHkxKSbzK8T7j+2a4W4pM1xaNGozamLc dGkNy5KX6Dg7PRab+B/ALgGBj4a2kIbDicPW9//LD2MTipE6j4OhElkj3ENCuMtV2q KStzxjUJqi4927wklMsVLTsRCvsHEqmxtZ4JI3P/GYhFxbCO0gCGFZm7VDionLik/8 BnQg3UyMIAPkJ3f0YUExb+BTsn/FBUe02GZem/0ZCIIGYJrXsVM/hfSAA2pENyKcyW QPSSZRRW9Qhc37oJHnZtJcJBRpUYATlWz/3Gv9fX7u4yOe7RaszckHDe8NxJVsxpG/ 4RRYnyPvDMKSg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sagi Grimberg , Hannes Reinecke , Daniel Wagner , Christoph Hellwig , Sasha Levin , linux-nvme@lists.infradead.org Subject: [PATCH AUTOSEL 5.14 157/252] nvme-tcp: don't check blk_mq_tag_to_rq when receiving pdu data Date: Thu, 9 Sep 2021 07:39:31 -0400 Message-Id: <20210909114106.141462-157-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sagi Grimberg [ Upstream commit 3b01a9d0caa8276d9ce314e09610f7fb70f49a00 ] We already validate it when receiving the c2hdata pdu header and this is not changing so this is a redundant check. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- drivers/nvme/host/tcp.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 8cb15ee5b249..d649b446da66 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -702,17 +702,9 @@ static int nvme_tcp_recv_data(struct nvme_tcp_queue *queue, struct sk_buff *skb, unsigned int *offset, size_t *len) { struct nvme_tcp_data_pdu *pdu = (void *)queue->pdu; - struct nvme_tcp_request *req; - struct request *rq; - - rq = blk_mq_tag_to_rq(nvme_tcp_tagset(queue), pdu->command_id); - if (!rq) { - dev_err(queue->ctrl->ctrl.device, - "queue %d tag %#x not found\n", - nvme_tcp_queue_id(queue), pdu->command_id); - return -ENOENT; - } - req = blk_mq_rq_to_pdu(rq); + struct request *rq = + blk_mq_tag_to_rq(nvme_tcp_tagset(queue), pdu->command_id); + struct nvme_tcp_request *req = blk_mq_rq_to_pdu(rq); while (true) { int recv_len, ret; -- 2.30.2