Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp452063pxb; Thu, 21 Apr 2022 03:27:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw64H+qDDTcNu2TVaf39uOJrAUkIVoBYBI6chGZuFCB8nJWtgM7Li/BWYk8d9ld/0pv1qnF X-Received: by 2002:a17:907:3da3:b0:6ef:f8e3:cf1a with SMTP id he35-20020a1709073da300b006eff8e3cf1amr7631073ejc.300.1650536821081; Thu, 21 Apr 2022 03:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650536821; cv=none; d=google.com; s=arc-20160816; b=vidxtRegABzQBrTc4sfGVJ+GoVDU4OkkIJlUh0PmNiCq2cDsgNfbImdtjUIcXBVdJo zBtw9PPuua6biCpvCImcHYb9SytlpLoLmoh5UhcLQCzalki4XC3+zD9bcjgYDKFms4FV w5XW2tWABQazVq9YKRgbSC+/vF8fXenSsi/4Pgb4D2qD0G/8wmr83WIu4v+R3Gt6lS3y PJz5m7VrQNw9f3ugPPK3lU8t9XcuzGsvcEpQgKdQW0SwQBSDEvn28x+p3S5EWlP0Lhta +x4kLafCC6f7/4MT+cfjyjSfxVCFwIFVKDUMXBbfcZpRYq91l0E+xSNXHlOxYW552ExQ RDwg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=bVFP1gGjko/YJi0nbJpTtGAq5TvC3VumTUjcBAwlTNE=; b=Pjb2lTA8utNLaE9FNOIoGICg2+EVxoLSMYbeos7Bl119Lz3+fUYYm93yZCJjeuq6m3 N6dzmviukvWFsaFj2SEOLOhYS3p9IpaC8ZZ8ohM4Va9OwNa5rLpIeqjKfwqSfxk3J5Va ioLkgMcJImZE2XSfzxNrAp84sGRULK/o5cCmHcS5+lMRR6Tuc9crj/UTlQkhuJJDlZ/P nJmgpcsrei9pUOZPb67ze++JpRS49rXL27t3U/3/VZAHOP2zNSaJpsX50nDVjPKvOa4Y vL5Gxy0Iq9jaaJaxaKOWiBzmuqRLNAjryQYL2D7uG5cPeU9s/0qvO1mPgWP6HkGaGF3d SK0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=d6gSUYNX; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a170906944e00b006f00c0f394dsi2758551ejx.773.2022.04.21.03.26.29; Thu, 21 Apr 2022 03:27:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=d6gSUYNX; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353882AbiDTSYO (ORCPT + 99 others); Wed, 20 Apr 2022 14:24:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233570AbiDTSYN (ORCPT ); Wed, 20 Apr 2022 14:24:13 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46260369F7 for ; Wed, 20 Apr 2022 11:21:26 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id i14so1921244qvk.13 for ; Wed, 20 Apr 2022 11:21:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bVFP1gGjko/YJi0nbJpTtGAq5TvC3VumTUjcBAwlTNE=; b=d6gSUYNXbuKckgW+ap7hqiYT1Yh8xGJWqO29rnp/76z48eezBIhE7VXobrcbjMdMWN 21nFfbn7z03zH3btcTiUWcwbvAO4T7Z9c7qxqB7dFk70LZb0XD7htwdvsXNQKvbxOHRU rgZE3MMFuhUmWlhiAlMo9v9sX6TXu4obqYGOF7fgEHKPsATnjs1fECz6iIITUnEsa/aJ elb7SArs4cYsDPx0OajZOJHucfJfu+WiHwrFo+odqcW5lRBFwBcC7D3ck+mzS0DoEuYd 1x26weqEpHte0vJiJB+m1P30ajEvZfJQ0y695SggcY5W5P97Bv86JWPFt6gna9F3lPpi sw3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bVFP1gGjko/YJi0nbJpTtGAq5TvC3VumTUjcBAwlTNE=; b=KYtpQWwzXOMFdZ4h3kD6AZbp98MzWOnxehV/Dy1MhY93CMPqifaw017Z4Rxh2oiX15 4xDva9EYQLXtvO2r3c5sA2dTPQVmHhc7Aibm/kdzNqDBNL6OhxWmJ8NUr5icdRR/MDfG O8cuk6dzgQCOzK5msVUEL8mQX5DfsaigD4s0ngk7iE+DY/OGZ1kP54Sjf90O1Rluammk wiO1ecGH8f9EFHM8OCJDVNEaPawdNiaqjTP+Lzk8rgoh9JGHqVbTOL43KHp1I9h1TbG1 nioqEGYYUjT/pneiMcqy0HWBm5+TA2p7bTYNaeaxq1Zq3e/iJ2wRaGFLOIm/ZIcDUEzX VI/A== X-Gm-Message-State: AOAM532HP14jpoplzAkaJx4+OAEyZSNlnG/FAwhbXwj2QH1gwsQ8Lpc9 1hhz+JIfU94BcZEpB5az1wCNrdA+mkw= X-Received: by 2002:ad4:4a07:0:b0:444:4bf6:3571 with SMTP id m7-20020ad44a07000000b004444bf63571mr16570990qvz.47.1650478885103; Wed, 20 Apr 2022 11:21:25 -0700 (PDT) Received: from kolga-mac-1.vpn.netapp.com ([2600:1700:6a10:2e90:7d70:fdbf:14d0:5acc]) by smtp.gmail.com with ESMTPSA id e15-20020a05622a110f00b002f33d65b065sm2111907qty.73.2022.04.20.11.21.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 11:21:24 -0700 (PDT) From: Olga Kornievskaia To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH 1/1] SUNRPC release the transport of a relocated task with an assigned transport Date: Wed, 20 Apr 2022 14:21:21 -0400 Message-Id: <20220420182121.87341-1-olga.kornievskaia@gmail.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Olga Kornievskaia A relocated task must release its previous transport. Fixes: 82ee41b85cef1 ("SUNRPC don't resend a task on an offlined transport") Signed-off-by: Olga Kornievskaia --- net/sunrpc/clnt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index af0174d7ce5a..95de454a858b 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1067,8 +1067,10 @@ void rpc_task_set_transport(struct rpc_task *task, struct rpc_clnt *clnt) { if (task->tk_xprt && !(test_bit(XPRT_OFFLINE, &task->tk_xprt->state) && - (task->tk_flags & RPC_TASK_MOVEABLE))) + (task->tk_flags & RPC_TASK_MOVEABLE))) { + xprt_release_write(task->tk_xprt, task); return; + } if (task->tk_flags & RPC_TASK_NO_ROUND_ROBIN) task->tk_xprt = rpc_task_get_first_xprt(clnt); else -- 2.27.0