diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2023-08-19 17:32:24 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2023-08-24 13:24:15 -0400 |
commit | cd18f24085f012b46b8271640b3c60fb27c0b05f (patch) | |
tree | 1d17dfae1767a1a217addb0bb75836ad964fa11b /net/sunrpc/clnt.c | |
parent | d2ee413884cdbdfcfc1560526615519311a47d33 (diff) |
SUNRPC: Don't override connect timeouts in rpc_clnt_add_xprt()
If the caller specifies the connect timeouts in the arguments to
rpc_clnt_add_xprt(), then we shouldn't override them.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 06df08b0ee9e..8d75290f1a31 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -3072,6 +3072,11 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt, } xprt->resvport = resvport; xprt->reuseport = reuseport; + + if (xprtargs->connect_timeout) + connect_timeout = xprtargs->connect_timeout; + if (xprtargs->reconnect_timeout) + reconnect_timeout = xprtargs->reconnect_timeout; if (xprt->ops->set_connect_timeout != NULL) xprt->ops->set_connect_timeout(xprt, connect_timeout, |