Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp542555pxb; Thu, 9 Sep 2021 06:47:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3/KwSGWKzTOChvCiTeYUZTeCjn7M0iP8qOFVMh8izPykJRVfnOuKiW7s+ycssM0ZRYi3E X-Received: by 2002:a05:6e02:e03:: with SMTP id a3mr2437725ilk.144.1631195247049; Thu, 09 Sep 2021 06:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631195247; cv=none; d=google.com; s=arc-20160816; b=P0mw7dyegpH3mK+evYBaChX8PRE7PD3w3+wHXU1uTh7dm0iFFjxtyDIetiXeBX3E0J wZv4bdef3P/WGzqzdDLNpaEJ3dl+oGvDWAGsitUb69LvJtYE6EAiBB9RIuVkNNwENBfK 6/kGrQ6ZtFGCA3qRVMFlo1lB7FxR/zEY5r8K5ARvh6q95t3ygXHXgaDo64prWZBYfh+y 8OYPA1BZSPzMXG/4VIgMibTd5jU0GiIgvmv/tej5q6v/WJrP2ctFNT2Hbku1qT8XZayC sZ0of/jim3g38xSjnXeEmzsSfjdk1kvNoKoneii9tEr3ACnOkygFtDaHPtUzVkQ4rjMN DeLg== 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=n90MZRu6hhxbdC9SUF3OK0apP1DlRwUkEU11AI44r4s=; b=vXgBT3qgzz+Fkv6MQsGwd1z/iN049pFEIL2Czdr1UsYFTTSxsT7ZtqYKC+kU3CwC5S EVdbfUQnMinlEU+yfaxu+sdXho1KJAB9giWvc8MkPY3qVveWf1ndzFaam943ixqXiP2U J/IxBuZlYWLTsjIkncY32NJ55OsKsxgPd5NeTaZA26q4yLeuJjn/2LLiUtCdLr4aGlbG 0LD0t8hIKS4siFVDUwRTfR+NM5ei5NB+GqKbzgFiPb7l1q4/UmX5a8cHt8Txj0ewEzIe /g6N2h65LkRUP/CnO8fbZ8nyjLqIrdmIToATZt/a1PhRRcD3n7OB/V3LizqTasaoraj1 Audw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F4RFH9rG; 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 p16si1331798ilc.75.2021.09.09.06.47.11; Thu, 09 Sep 2021 06:47:27 -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=F4RFH9rG; 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 S237365AbhIINq5 (ORCPT + 99 others); Thu, 9 Sep 2021 09:46:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:42574 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351449AbhIIMrk (ORCPT ); Thu, 9 Sep 2021 08:47:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7C4DB60555; Thu, 9 Sep 2021 11:56:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631188594; bh=ya837GmVjltzofHK0e4DImDd6KZP8/OzW8tMJEzZJ3U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F4RFH9rGiFP9omwyzDi/XV4qeJahUx32NQH9tdoSDOKK2PBfaE/VuwBNDwfyE5S42 GL7i6ZDcrK3GKa3B+w6pBg8HeNL1qmUNpGpeFjmitk55ANtVVq5b4uVi8lm3HNQt36 F77eVoobq5rcNc5tNDAoqyXPdZEgtTMiyQjGuLq5cFignQP3T1UUdVpDHzu+6yxXl5 vlShKO3kOuD6Umj55jMm06VUzHvZ7K53Y5gxUbJSlY3iqAyt36Yr9ckSeFrGsprdqP Al5vDNPP4hcXCtGasVeAsSu0y+NO8h5BpSyqELIbzJd8vjLb9vvn8eBDUCQ/2LDOsl d/o1pCpTYQ3Cw== 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.4 068/109] nvme-tcp: don't check blk_mq_tag_to_rq when receiving pdu data Date: Thu, 9 Sep 2021 07:54:25 -0400 Message-Id: <20210909115507.147917-68-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909115507.147917-1-sashal@kernel.org> References: <20210909115507.147917-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 718152adc625..1458b18cbf24 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