Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4048101ybv; Mon, 10 Feb 2020 11:16:29 -0800 (PST) X-Google-Smtp-Source: APXvYqzv09zTXRZv+DqkQtyOm5mWtIINZI3YTPbkhhjwi9st4biz5uWgZ5TCqkCBUrrBx6bQVJbo X-Received: by 2002:aca:bb54:: with SMTP id l81mr333609oif.175.1581362189616; Mon, 10 Feb 2020 11:16:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581362189; cv=none; d=google.com; s=arc-20160816; b=KV+mcZ0u3oJ5bE5wstzjUk5Clr+eRRj4VPLotDO42tnlh/fcTBjl0EInk1zBxNB9BS DLpLkg1L7Zkd+4tvuSiPixmuk6bHJcQLOekqeXDhVePyKCUuWr76IAp/ddmddKunQnN3 H7n9sPWYE57ofbKAbvjr3ClaS3yVkNbcBX6s+ggOTbboTGMo/eBShQBaMyoM8wv8FCIe t+0hvL7oz7VyRvB+znKMnkqgx0yupZVKZeShU13mxPSnZmGI0S7wU/5AxOUdyyVPwcpd w17ocgwvwUg0ZUXEx+7ODjz1xsO//RGVIO2W6BxrPOPnMgl1hgzYunEXcbzK8tYMxxrF pPkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=8aMIdSbKzgajTBdWOQFKylPBEb9etNnzN78zz1ELB7I=; b=U2TbCSSiGO7pfzbJK+tvr16YooiGiEdlx+85GJ27H9YOinkZGPmPr2vT03NAYh36IZ k3mTtMh9CHtb+C4oCAUL1uSHII0vk5mW24nzk4RrLrfOfq2fjG5k+GdeIKeytEeWhxyz Iy1RcFDUfyQjQiVd691QxPz974k+2KdXdUbGBDvjo4y/ReYWiZIp12RMNQ69d9EWoPKR WlKC3FpGPLJ/t18di7qBf0TpbaEY7OnXAfluf/scGgoswX+eSnUCSNcl2lAjX5GO2MKc 3Oydlu9Tz9c9lefgnXfzhrA4MftFVsNKu6KubqJ8cAfikUh04Ca88+t3CQCaPVCx2cHs VMng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G7rLe0vc; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l26si657930otd.143.2020.02.10.11.16.18; Mon, 10 Feb 2020 11:16:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G7rLe0vc; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 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 S1727029AbgBJTQK (ORCPT + 99 others); Mon, 10 Feb 2020 14:16:10 -0500 Received: from mail-yw1-f68.google.com ([209.85.161.68]:35402 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727331AbgBJTQK (ORCPT ); Mon, 10 Feb 2020 14:16:10 -0500 Received: by mail-yw1-f68.google.com with SMTP id i190so3953347ywc.2 for ; Mon, 10 Feb 2020 11:16:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=8aMIdSbKzgajTBdWOQFKylPBEb9etNnzN78zz1ELB7I=; b=G7rLe0vcAN4k2w8fEwt+dfhRGowGdgQsW7H6EqQi0X7v958EekjBav0RJ2GIt/5XXX yyDDEztaQoh7CwUK/jTwype/bOBlCqekGZDuvUWz8N1CBNrQZC73j5P5sqZJemrxJKzf 19GWrq+DlNX2HqddfL7OB7/pYnBUwFI7kXsOmOmwSTi9++NidqCQEMOBd1ubA1+BlLCW /yzBSFEQNVm8B6Nj0CkTZINWZQtWsuYL0Df+GuKcbe9Pk8dBUDT2NrQYkqWlFwd4l2kj Xo6PXL92Li+0c1o+zZF6ajbLrBhYV8eYXXuC0lOl29wgYUS9I+k+sosFxt0TU62+s2SU 0mwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8aMIdSbKzgajTBdWOQFKylPBEb9etNnzN78zz1ELB7I=; b=efSfjIGGzncPbkkuFtuQJ3ijX0CTePFoJmE+FhiP90APeXjmryLVe07Mcqy0XCkCOz KJofMzh0b4QaYLD+jtB+F5q15PPvsU/nbcQYdAotasUOzImmy8FuSEH+/BhNcf7NTBKK 8TwmPzawowSYZmSBUSMrQodN9/jfa9LKMei9bwJeWtjxmAdMX1rXK7y/Q/lbonOkq5/D K+0UF9VUwBJ/giR9D6LbRfesAHH65iKxuUJOHOHUvroDrZX5VuMbcIdBWeh0ndi4+fsY b05WmQaNPP5WmQTiEkUYfG2t3J0ZAnDHvyvnrsL6SwNaXtJnhiacaNuD0C7E0QDxiPIP 3rXg== X-Gm-Message-State: APjAAAW8OrIjxxDFzl2fcObLUbcm+3iS/Isyo4UJZ87/QQzM0qRAIZHV coVXKZjZll1SIhCqFPG0Hp6Z2vVQyw== X-Received: by 2002:a81:52cd:: with SMTP id g196mr2362676ywb.89.1581362167649; Mon, 10 Feb 2020 11:16:07 -0800 (PST) Received: from localhost.localdomain (c-68-40-189-247.hsd1.mi.comcast.net. [68.40.189.247]) by smtp.gmail.com with ESMTPSA id o4sm660222ywd.5.2020.02.10.11.16.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2020 11:16:07 -0800 (PST) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: linux-nfs@vger.kernel.org Subject: [PATCH 3/8] SUNRPC: Don't take a reference to the cred on synchronous tasks Date: Mon, 10 Feb 2020 14:13:40 -0500 Message-Id: <20200210191345.557460-4-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200210191345.557460-3-trond.myklebust@hammerspace.com> References: <20200210191345.557460-1-trond.myklebust@hammerspace.com> <20200210191345.557460-2-trond.myklebust@hammerspace.com> <20200210191345.557460-3-trond.myklebust@hammerspace.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org If the RPC call is synchronous, assume the cred is already pinned by the caller. Signed-off-by: Trond Myklebust --- net/sunrpc/clnt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 2345e563c2f4..252b044cdcdf 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1127,6 +1127,9 @@ struct rpc_task *rpc_run_task(const struct rpc_task_setup *task_setup_data) task = rpc_new_task(task_setup_data); + if (!RPC_IS_ASYNC(task)) + task->tk_flags |= RPC_TASK_CRED_NOREF; + rpc_task_set_client(task, task_setup_data->rpc_client); rpc_task_set_rpc_message(task, task_setup_data->rpc_message); -- 2.24.1