Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

SUNRPC: Modify synopsis of rpc_client_register()

The rpc_client_register() helper was added in commit e73f4cc0,
"SUNRPC: split client creation routine into setup and registration,"
Mon Jun 24 11:52:52 2013. In a subsequent patch, I'd like to invoke
rpc_client_register() from a context where a struct rpc_create_args
is not available.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

authored by

Chuck Lever and committed by
Trond Myklebust
d746e545 d2bfda2e

+7 -6
+7 -6
net/sunrpc/clnt.c
··· 272 272 memcpy(clnt->cl_nodename, nodename, clnt->cl_nodelen); 273 273 } 274 274 275 - static int rpc_client_register(const struct rpc_create_args *args, 276 - struct rpc_clnt *clnt) 275 + static int rpc_client_register(struct rpc_clnt *clnt, 276 + rpc_authflavor_t pseudoflavor, 277 + const char *client_name) 277 278 { 278 279 struct rpc_auth_create_args auth_args = { 279 - .pseudoflavor = args->authflavor, 280 - .target_name = args->client_name, 280 + .pseudoflavor = pseudoflavor, 281 + .target_name = client_name, 281 282 }; 282 283 struct rpc_auth *auth; 283 284 struct net *net = rpc_net_ns(clnt); ··· 299 298 auth = rpcauth_create(&auth_args, clnt); 300 299 if (IS_ERR(auth)) { 301 300 dprintk("RPC: Couldn't create auth handle (flavor %u)\n", 302 - args->authflavor); 301 + pseudoflavor); 303 302 err = PTR_ERR(auth); 304 303 goto err_auth; 305 304 } ··· 399 398 /* save the nodename */ 400 399 rpc_clnt_set_nodename(clnt, utsname()->nodename); 401 400 402 - err = rpc_client_register(args, clnt); 401 + err = rpc_client_register(clnt, args->authflavor, args->client_name); 403 402 if (err) 404 403 goto out_no_path; 405 404 if (parent)