Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1733322pxb; Thu, 16 Sep 2021 14:16:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNTySlm6J0rDTLCgusG9QJcXPrRL+tj/8GHmW3ltgfaZCqxKxpNIO2/mrZoY52IqXleVIw X-Received: by 2002:a02:7813:: with SMTP id p19mr6005484jac.38.1631826999599; Thu, 16 Sep 2021 14:16:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631826999; cv=none; d=google.com; s=arc-20160816; b=yp2IUsHv2/9b0OUD2Nd4BiZcv9WLWraBQ/7iSn51gUacZ7eZo4i0m2cp7Btnws5Ivi d+xUL1JZWszuHy7GDid/rk8CIeuwojULaW2mghgVyUe3+SoJWC3CDBivvQIRgHYZw5wW JJtgcL8lGre8pvCqwXccn6UE16FEhuFPL47W06YH0cUC5PAYbuzZEtfLGb608hwGJIF4 gKIK5PjzdKy+YdFfR9Q7KEsU9ZXjyI/zPhjEXoYKfu3knrseaDhVfvTQht17dw34TC7r +AbGlrxrAZoH9XmoL3h9E5eKk4cj/YS78G2x3DvBtptyiMEpF773XjBdDzqOcvacobNV kImA== 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=SRidtdHzsgcdzQDTbiRkOAWjgemaCBjv+vsTjCSJXKE=; b=bXSfwwhFZYGwnyZiN2/TsFigNBUL2FIUkndY+2nQR/3gTEaDHIx3Fr9l0Fy60xlHmC 6hHhhKozbRsKUQS99tBHOhb5kD+qJUTASe6dMKaek2lkIcJQJi1VoTEoCrOYeie5uTFO RDpsPTH2BWvC3q8jfyLTVPLqcl1a1rDlr7h4F+KeRY6DuhGdP6E+D1hJyvmAxpAa6MnE jpPS4ioqOdaxSayS56KQdo5wM6KKTsTkCXd/Q//Jp//JGxHvBKXFk/9FdedlKk5jI0N4 b9tzYynG6XX97eSi7tSOE+gm0H13a6W1fKW9MpC3/FgvXfp1SRV75QuCbrDkQS0qOn35 YG4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UcGrQeRI; 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 u10si3508873ilm.0.2021.09.16.14.16.28; Thu, 16 Sep 2021 14:16:39 -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=UcGrQeRI; 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 S242934AbhIPQ3t (ORCPT + 99 others); Thu, 16 Sep 2021 12:29:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:59354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241769AbhIPQUH (ORCPT ); Thu, 16 Sep 2021 12:20:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0DBCC61241; Thu, 16 Sep 2021 16:14:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808863; bh=dqTWuo6M7NXijIqe+ycGzOMzx5qOZ/q1kLrI7X5ugZs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UcGrQeRIGZFrZo6KwGvKsGs+2o6YwKBFmzk6OUovgk4/coraPBNrTnfh7lJFl7raa BpRKVLPkBC5P81FVwmQP7yvXVZ+mpaWUcZC/mTNfdw3DQOTKA+Oterrr1UYR3XX/z4 cAVUj1+RRfncCY15iZE7r4jFP/wUSgdPnEef6lnA= 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.10 218/306] nvme-tcp: dont check blk_mq_tag_to_rq when receiving pdu data Date: Thu, 16 Sep 2021 17:59:23 +0200 Message-Id: <20210916155801.481433562@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@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 5b11d8a23813..986e5fbf31ad 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -699,17 +699,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