Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142163
b: refs/heads/master
c: a601cae
h: refs/heads/master
i:
  142161: 3348d1d
  142159: 4608186
v: v3
  • Loading branch information
J. Bruce Fields committed Mar 18, 2009
1 parent cb16353 commit 0cf6f94
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 418cd20aa19b54554cab383e2fd0d1cb8c4732ee
refs/heads/master: a601caeda21c0e94c153dbd146ec0899cc5f324f
29 changes: 21 additions & 8 deletions trunk/fs/nfsd/nfs4callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,8 @@ static struct rpc_program cb_program = {
/* Reference counting, callback cleanup, etc., all look racy as heck.
* And why is cb_set an atomic? */

static int do_probe_callback(void *data)
static struct rpc_clnt *setup_callback_client(struct nfs4_client *clp)
{
struct nfs4_client *clp = data;
struct sockaddr_in addr;
struct nfs4_callback *cb = &clp->cl_callback;
struct rpc_timeout timeparms = {
Expand All @@ -384,15 +383,10 @@ static int do_probe_callback(void *data)
.flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET),
.client_name = clp->cl_principal,
};
struct rpc_message msg = {
.rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL],
.rpc_argp = clp,
};
struct rpc_clnt *client;
int status = -EINVAL;

if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5))
goto out_err;
return ERR_PTR(-EINVAL);

/* Initialize address */
memset(&addr, 0, sizeof(addr));
Expand All @@ -402,6 +396,25 @@ static int do_probe_callback(void *data)

/* Create RPC client */
client = rpc_create(&args);
if (IS_ERR(client))
dprintk("NFSD: couldn't create callback client: %ld\n",
PTR_ERR(client));
return client;

}

static int do_probe_callback(void *data)
{
struct nfs4_client *clp = data;
struct nfs4_callback *cb = &clp->cl_callback;
struct rpc_message msg = {
.rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL],
.rpc_argp = clp,
};
struct rpc_clnt *client;
int status;

client = setup_callback_client(clp);
if (IS_ERR(client)) {
status = PTR_ERR(client);
dprintk("NFSD: couldn't create callback client: %d\n",
Expand Down

0 comments on commit 0cf6f94

Please sign in to comment.