| From 0c39010e7a9d7c748ed53f5d15dddf21acc2706e Mon Sep 17 00:00:00 2001 | |
| From: Sasha Levin <sashal@kernel.org> | |
| Date: Thu, 22 Oct 2026 21:43:16 +0300 | |
| Subject: SUNRPC: preserve timeout policy when cloning clients | |
| From: Avi Weiss <thnkslprpt@gmail.com> | |
| [ Upstream commit 5b0ac1f82201c2ab2d9c31ed568cc782bac6a399 ] | |
| rpc_clone_client() and rpc_clone_client_set_auth() leave the | |
| timeout argument unset, causing rpc_new_client() to use the | |
| transport defaults instead of the parent's configured | |
| timeout. This also affects pNFS data-server clients and | |
| changes their request timeout and initial RTT calculations. | |
| Use the parent's cl_timeout when no timeout is specified. | |
| Preserve explicitly supplied timeout overrides. | |
| Fixes: 1b63a75180c6 ("SUNRPC: Refactor rpc_clone_client()") | |
| Signed-off-by: Avi Weiss <thnkslprpt@gmail.com> | |
| Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com> | |
| Signed-off-by: Sasha Levin <sashal@kernel.org> | |
| --- | |
| net/sunrpc/clnt.c | 2 ++ | |
| 1 file changed, 2 insertions(+) | |
| diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c | |
| index 73f8469767d32..3d9d7c930f352 100644 | |
| --- a/net/sunrpc/clnt.c | |
| +++ b/net/sunrpc/clnt.c | |
| @@ -653,6 +653,8 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args, | |
| } | |
| args->servername = xprt->servername; | |
| args->nodename = clnt->cl_nodename; | |
| + if (!args->timeout) | |
| + args->timeout = clnt->cl_timeout; | |
| new = rpc_new_client(args, xps, xprt, clnt); | |
| if (IS_ERR(new)) | |
| -- | |
| 2.53.0 | |