Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1568102pxb; Thu, 16 Sep 2021 10:04:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbdHClOVPYt5jPNiVLAbNbT9mLn0e2FeoqgL9nVZRjSxsywZNHegE9n0nssGQJbnlTtnjZ X-Received: by 2002:a5d:6a8b:: with SMTP id s11mr7361804wru.127.1631811891730; Thu, 16 Sep 2021 10:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631811891; cv=none; d=google.com; s=arc-20160816; b=TGPyR3RBmD5fcVrmFALrV8NXaF4uZyokirk7iZaNfBa0vxsje9XTjRkLLYiHBN8nVi 6rKZxe8ELp8piKLKjey69pudPk/qP+eq0UsGrfbwjaUHjwri201yhjabNsS5BPA494/g Or7zvj/pWDl33EeLlrlWDUOVK6KM2mnqkvsDZYwlyNngEsYvUVCjNf6ZH8q/gpJZD40j Uj05KCMN+p9Ymx8CuUUyialZIO+cWLbLPRldu3MqxzsU1lt7rEzGJG8DY1ZnUV+iPX3l PjNe5oQlOjOXJpxBJIfJYQ/c3AklnDPYjYEpYJmCTV+1gAmrWqxRUWei7yZX992xyW5W WPgw== 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=2NVZEKxA6uq8PYN5uTPa2skTAGIYtGZpg24hpzvBXP4=; b=m1uKYqfL3FQS8FEun0GeDNwljB+laLVhMDuHLZKEz6EyvCtsjNOZs/IfLQpK3vMH/T +EpsrHHECaUOirffSV3UcSD8J/8EMKofIHA8x/13ZqUD5+u7bXvw/qXaM+a9I74GY/AQ 1l8us66HUWzREA2atWNY97WmcFk+DfvXZO6xvV4ujaEIdhPw7LfXbz21/mgTH7ZGdmJS qSEZ3ET7r7R1kbB28jrZPJ4XtpvNO3ZmvNm/y3SDGlwnVdZBibYq5KN3e/24bWbVB01B KUQhjrUcayj+doEvYedxpV/lhXc43UJKpMozX31NJBkzz4zN0m7KsoF970fUvegzDYax MUDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EDDqsgyd; 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 w20si4041962edi.6.2021.09.16.10.04.26; Thu, 16 Sep 2021 10:04:51 -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=EDDqsgyd; 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 S244165AbhIPQ6X (ORCPT + 99 others); Thu, 16 Sep 2021 12:58:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:36668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240891AbhIPQwl (ORCPT ); Thu, 16 Sep 2021 12:52:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7933561A89; Thu, 16 Sep 2021 16:29:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631809758; bh=smrg7xdiaHk44GbPsjmDFBSTWmaqt+YyDAr2cps7BDs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EDDqsgydUhJYbnsudoCg8KpnPY5Y/uHO3lE4MV0ccEFW0vtr/KFN0apzhLWx/ZGMG hJicabRD2bUwQ7rnAd0h2Zezse51X1oxyZ6GWxtuApy6ejDrbTd6tR1qFijlKznCTL EYVA5mJSuJX+uXOIuq91WFSEfNLmIFKoPSLTJ5gw= 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.13 272/380] nvme-tcp: dont check blk_mq_tag_to_rq when receiving pdu data Date: Thu, 16 Sep 2021 18:00:29 +0200 Message-Id: <20210916155813.324701191@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155803.966362085@linuxfoundation.org> References: <20210916155803.966362085@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 ab1ea5b0888e..da289b8f8a27 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