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>
This commit is contained in:
parent
d2bfda2e7a
commit
d746e54522
1 changed files with 7 additions and 6 deletions
|
@ -272,12 +272,13 @@ static void rpc_clnt_set_nodename(struct rpc_clnt *clnt, const char *nodename)
|
||||||
memcpy(clnt->cl_nodename, nodename, clnt->cl_nodelen);
|
memcpy(clnt->cl_nodename, nodename, clnt->cl_nodelen);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rpc_client_register(const struct rpc_create_args *args,
|
static int rpc_client_register(struct rpc_clnt *clnt,
|
||||||
struct rpc_clnt *clnt)
|
rpc_authflavor_t pseudoflavor,
|
||||||
|
const char *client_name)
|
||||||
{
|
{
|
||||||
struct rpc_auth_create_args auth_args = {
|
struct rpc_auth_create_args auth_args = {
|
||||||
.pseudoflavor = args->authflavor,
|
.pseudoflavor = pseudoflavor,
|
||||||
.target_name = args->client_name,
|
.target_name = client_name,
|
||||||
};
|
};
|
||||||
struct rpc_auth *auth;
|
struct rpc_auth *auth;
|
||||||
struct net *net = rpc_net_ns(clnt);
|
struct net *net = rpc_net_ns(clnt);
|
||||||
|
@ -298,7 +299,7 @@ static int rpc_client_register(const struct rpc_create_args *args,
|
||||||
auth = rpcauth_create(&auth_args, clnt);
|
auth = rpcauth_create(&auth_args, clnt);
|
||||||
if (IS_ERR(auth)) {
|
if (IS_ERR(auth)) {
|
||||||
dprintk("RPC: Couldn't create auth handle (flavor %u)\n",
|
dprintk("RPC: Couldn't create auth handle (flavor %u)\n",
|
||||||
args->authflavor);
|
pseudoflavor);
|
||||||
err = PTR_ERR(auth);
|
err = PTR_ERR(auth);
|
||||||
goto err_auth;
|
goto err_auth;
|
||||||
}
|
}
|
||||||
|
@ -398,7 +399,7 @@ static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args,
|
||||||
/* save the nodename */
|
/* save the nodename */
|
||||||
rpc_clnt_set_nodename(clnt, utsname()->nodename);
|
rpc_clnt_set_nodename(clnt, utsname()->nodename);
|
||||||
|
|
||||||
err = rpc_client_register(args, clnt);
|
err = rpc_client_register(clnt, args->authflavor, args->client_name);
|
||||||
if (err)
|
if (err)
|
||||||
goto out_no_path;
|
goto out_no_path;
|
||||||
if (parent)
|
if (parent)
|
||||||
|
|
Loading…
Add table
Reference in a new issue