Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3913513pxf; Mon, 22 Mar 2021 19:59:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaqk1m6agLggLaw1YWPkzfyQtk/r8QovZvICoP5i1T7MnpmzrBn8mC0lIhBNPP4Q06Yvdf X-Received: by 2002:a17:907:9808:: with SMTP id ji8mr2696796ejc.333.1616468342051; Mon, 22 Mar 2021 19:59:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616468342; cv=none; d=google.com; s=arc-20160816; b=Rcv2GY6b3KGPU2V4Kd9nN4I5VBsqdfUuSicSDYdE1BENTRft/Vzz85el2SXpITQ+8M MkolDu/sJPHForFjB1z1na/ZKJASo22Vualyz7byWG1gtwAXg4HVf5rx1s3wASvhoixk rZEcy14cttIUuPz2JJDmqL74JzeJ8XqOsmV2NdU91TxzoyYFH6DeHDiGmx3L60MLDsgp mRRZ7/PQJcytG+4zKq4CKnftG+RQr7yt+V9xyNNRR0qJVRITs6GR6aUvgoRpjic5YciU anle2T8YsNzLfgYl59ojGh0mMe1ROjsb5KwKcxAY6QiX1R0oSStAaypoWRogqmiHcolH U51w== 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; bh=9JH98GetPb22T/0Kaf33f2G9S+cEPJngVQ4sA7ZSEDc=; b=UZ82K1LxqF+XOwaj/SFLe5LBnywgEEwpBgwBQP5R1iC+E6YIOz4Egs1lLfzeSfUfK2 9AGInrJj4W9n3UivRIQDWXWtXPpVfpolAcacm/idrLbvfz1DCm/fnhomBjYX/Gzvgk6v 1i8/3hme8Bz5iJ6uTtSZM3EQTP0zuK13+Xn1CgoQP9dmHPdPzrYdbnHjqi7UCz+58UZG ZodKSg0nlFtLVHHuv0W1cu6Fb0xi5LhzgY9uPSQPCvanG4bCg84Pb5J2dGPxUD2+v+xu AFNfGzheWpjidXS2YvBR/24v747PKj3nxIUpvq0ZTdN+NteaXdkW9/McOEkejminc7Ar 96VA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m20si13314801edv.175.2021.03.22.19.58.35; Mon, 22 Mar 2021 19:59:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229639AbhCWC5n (ORCPT + 99 others); Mon, 22 Mar 2021 22:57:43 -0400 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:35932 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229946AbhCWC5a (ORCPT ); Mon, 22 Mar 2021 22:57:30 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R361e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=eguan@linux.alibaba.com;NM=1;PH=DS;RN=2;SR=0;TI=SMTPD_---0UT1O3Lg_1616468248; Received: from localhost(mailfrom:eguan@linux.alibaba.com fp:SMTPD_---0UT1O3Lg_1616468248) by smtp.aliyun-inc.com(127.0.0.1); Tue, 23 Mar 2021 10:57:28 +0800 From: Eryu Guan To: linux-nfs@vger.kernel.org Cc: Eryu Guan Subject: [PATCH v2 2/2] sunrpc: honor rpc_task's timeout value in rpcb_create() Date: Tue, 23 Mar 2021 10:57:14 +0800 Message-Id: <20210323025714.28510-2-eguan@linux.alibaba.com> X-Mailer: git-send-email 2.26.1.107.gefe3874 In-Reply-To: <20210323025714.28510-1-eguan@linux.alibaba.com> References: <20210323025714.28510-1-eguan@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Currently rpcbind client is created without setting rpc timeout (thus using the default value). But if the rpc_task already has a customized timeout in its tk_client field, it's also ignored. Let's use the same timeout setting in rpc_task->tk_client->cl_timeout for rpcbind connection. Signed-off-by: Eryu Guan --- v2: no change since v1 net/sunrpc/rpcb_clnt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index 38fe2ce8a5aa..647b323cc1d5 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c @@ -344,13 +344,15 @@ static struct rpc_clnt *rpcb_create(struct net *net, const char *nodename, const char *hostname, struct sockaddr *srvaddr, size_t salen, int proto, u32 version, - const struct cred *cred) + const struct cred *cred, + const struct rpc_timeout *timeo) { struct rpc_create_args args = { .net = net, .protocol = proto, .address = srvaddr, .addrsize = salen, + .timeout = timeo, .servername = hostname, .nodename = nodename, .program = &rpcb_program, @@ -705,7 +707,8 @@ void rpcb_getport_async(struct rpc_task *task) clnt->cl_nodename, xprt->servername, sap, salen, xprt->prot, bind_version, - clnt->cl_cred); + clnt->cl_cred, + task->tk_client->cl_timeout); if (IS_ERR(rpcb_clnt)) { status = PTR_ERR(rpcb_clnt); goto bailout_nofree; -- 2.26.1.107.gefe3874