Skip to content

Commit 3047912

Browse files
scottmayhewamschuma-ntap
authored andcommitted
sunrpc: set cl_max_connect when cloning an rpc_clnt
If the initial attempt at trunking detection using the krb5i auth flavor fails with -EACCES, -NFS4ERR_CLID_INUSE, or -NFS4ERR_WRONGSEC, then the NFS client tries again using auth_sys, cloning the rpc_clnt in the process. If this second attempt at trunking detection succeeds, then the resulting nfs_client->cl_rpcclient winds up having cl_max_connect=0 and subsequent attempts to add additional transport connections to the rpc_clnt will fail with a message similar to the following being logged: [502044.312640] SUNRPC: reached max allowed number (0) did not add transport to server: 192.168.122.3 Signed-off-by: Scott Mayhew <[email protected]> Fixes: dc48e0a ("SUNRPC enforce creation of no more than max_connect xprts") Signed-off-by: Anna Schumaker <[email protected]>
1 parent 880265c commit 3047912

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/sunrpc/clnt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args,
651651
new->cl_discrtry = clnt->cl_discrtry;
652652
new->cl_chatty = clnt->cl_chatty;
653653
new->cl_principal = clnt->cl_principal;
654+
new->cl_max_connect = clnt->cl_max_connect;
654655
return new;
655656

656657
out_err:

0 commit comments

Comments
 (0)