Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2348985pxb; Mon, 20 Sep 2021 19:42:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5vEq3fWCUGZgp05Pac8nNFE75n4rw4kl1D+F2ff+vjqphQpi0OTP6yZDs/g1L/fghdx3q X-Received: by 2002:aa7:d814:: with SMTP id v20mr7295951edq.169.1632192127060; Mon, 20 Sep 2021 19:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192127; cv=none; d=google.com; s=arc-20160816; b=H6WuttlV0Qzbq51YCv1ZyEfGRWWEUJGUp83fq/HJ6FWCHzecH98Fb6xi/snrDTwnaY Tf4gXkhyDwxymr5hc4Aj+mvYf4CmNyotBorFz2p9h5It1DREPKi8dzgd1ltr5MN5si7C hae2EZTipDFVBpuInesK/w/UWQWBX/qfzXTVAcnz4p58UII62U8rxA4uxWuKigF2+L/1 CtthDH9TN5EhLzn3Omk6vFmyKw6aEfN/KXHmsM9+DdFwVb3tg9tp+dbec0ZScjdbCWhD MJ4zE9SkVxakengO4vrvEIH1RNHtqvlwKVD/8DWQiddwpFfSvipzFtcLsiiPOPq/rb5Y rG5g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/qb8QFLbJ+6cKqXDGEDmP1x2wawMoMApMmJML/XWHkk=; b=JQE4stGBzbZkBxw0/9xYFgP9oxO2joNxfaqyX2WYY7zXg6uIS7zDknI1trKJEV0+mA jKYtWNNqOLMZM9joW6kfz5zWha6DSuWY/U0AZckLn3Q9aqYVMbbK++K4H6ls7dY3fhXS HQIZRnmFJ+d2SU3vHUJIKB3Ojh4FKbcSUIns+Feqi9LJ8f7956atc2a6NzUE+y+4R1Z6 yKogFH88h8b6mK+eKLThNZGobpMig41xUJ4/Z4/+rVA3sS3Sc9+R0C2ek6u9Ka3IBPpj zJZFWA1wySnUgYdF4zPrwXZC4dETr8auAxfM25fW/WgkQWft/mfHu7K4JJrSmOwT71ge zvjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=satmp6Qi; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jr1si17736466ejb.574.2021.09.20.19.41.43; Mon, 20 Sep 2021 19:42:07 -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=@linuxfoundation.org header.s=korg header.b=satmp6Qi; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346348AbhITSRK (ORCPT + 99 others); Mon, 20 Sep 2021 14:17:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:35776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359646AbhITSKI (ORCPT ); Mon, 20 Sep 2021 14:10:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BCC8361A54; Mon, 20 Sep 2021 17:19:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158395; bh=0rxLrLi+Gw87hruPXyu3+elUkVeqFInT631X7wIVMGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=satmp6QiC05HdJZV9nE1jTbfRJOAQkAPSLZGSKbUpsl4Xt50POdv/r5wmdLAmBoCo m/8VPG5BxZNssYmIsNov1x4qn1J9gmfHtwIBN1lrME5kM2H8jyLhRr2FM94ZFcnkMO aTmK8t+RITdr/RpvrhKrFUTBDSQf5UJPVYOXhEyQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hannes Reinecke , Sagi Grimberg , Daniel Wagner , Christoph Hellwig , Sasha Levin Subject: [PATCH 5.4 136/260] nvme-tcp: dont check blk_mq_tag_to_rq when receiving pdu data Date: Mon, 20 Sep 2021 18:42:34 +0200 Message-Id: <20210920163935.742155382@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 f6427a10a990..38bbbbbc6f47 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -642,17 +642,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