SUNRPC: rpc_clnt_set_transport() must not change the autobind setting
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 24 Mar 2025 23:35:01 +0000 (19:35 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 26 Mar 2025 16:17:46 +0000 (12:17 -0400)
The autobind setting was supposed to be determined in rpc_create(),
since commit c2866763b402 ("SUNRPC: use sockaddr + size when creating
remote transport endpoints").

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/clnt.c

index 1cfaf93ceec12eead64152d9bf8b538b1cd666ad..6f75862d97820c9828b9281b37fd55dd0a9ecb90 100644 (file)
@@ -270,9 +270,6 @@ static struct rpc_xprt *rpc_clnt_set_transport(struct rpc_clnt *clnt,
        old = rcu_dereference_protected(clnt->cl_xprt,
                        lockdep_is_held(&clnt->cl_lock));
 
-       if (!xprt_bound(xprt))
-               clnt->cl_autobind = 1;
-
        clnt->cl_timeout = timeout;
        rcu_assign_pointer(clnt->cl_xprt, xprt);
        spin_unlock(&clnt->cl_lock);