Skip to content

Commit cd18f24

Browse files
Trond Myklebustamschuma-ntap
authored andcommitted
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 <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent d2ee413 commit cd18f24

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

net/sunrpc/clnt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3072,6 +3072,11 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt,
30723072
}
30733073
xprt->resvport = resvport;
30743074
xprt->reuseport = reuseport;
3075+
3076+
if (xprtargs->connect_timeout)
3077+
connect_timeout = xprtargs->connect_timeout;
3078+
if (xprtargs->reconnect_timeout)
3079+
reconnect_timeout = xprtargs->reconnect_timeout;
30753080
if (xprt->ops->set_connect_timeout != NULL)
30763081
xprt->ops->set_connect_timeout(xprt,
30773082
connect_timeout,

0 commit comments

Comments
 (0)