diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-07-02 08:39:09 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-07-02 08:39:09 -0400 |
commit | d2f6409584e2c62ffad81690562330ff3bf4a458 (patch) | |
tree | 3bdfb97d0b51be2f7f414f2107e97603c1206abb /fs/nfsd/nfs4callback.c | |
parent | e1b09eba2686eca94a3a188042b518df6044a3c1 (diff) | |
parent | 4a89a04f1ee21a7c1f4413f1ad7dcfac50ff9b63 (diff) |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 1a55dfcb74bc..583c0710e45e 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -54,7 +54,6 @@ | |||
54 | 54 | ||
55 | /* declarations */ | 55 | /* declarations */ |
56 | static void nfs4_cb_null(struct rpc_task *task); | 56 | static void nfs4_cb_null(struct rpc_task *task); |
57 | extern spinlock_t recall_lock; | ||
58 | 57 | ||
59 | /* Index of predefined Linux callback client operations */ | 58 | /* Index of predefined Linux callback client operations */ |
60 | 59 | ||
@@ -329,12 +328,12 @@ out: | |||
329 | .p_bufsiz = MAX(NFS4_##argtype##_sz,NFS4_##restype##_sz) << 2, \ | 328 | .p_bufsiz = MAX(NFS4_##argtype##_sz,NFS4_##restype##_sz) << 2, \ |
330 | } | 329 | } |
331 | 330 | ||
332 | struct rpc_procinfo nfs4_cb_procedures[] = { | 331 | static struct rpc_procinfo nfs4_cb_procedures[] = { |
333 | PROC(CB_NULL, NULL, enc_cb_null, dec_cb_null), | 332 | PROC(CB_NULL, NULL, enc_cb_null, dec_cb_null), |
334 | PROC(CB_RECALL, COMPOUND, enc_cb_recall, dec_cb_recall), | 333 | PROC(CB_RECALL, COMPOUND, enc_cb_recall, dec_cb_recall), |
335 | }; | 334 | }; |
336 | 335 | ||
337 | struct rpc_version nfs_cb_version4 = { | 336 | static struct rpc_version nfs_cb_version4 = { |
338 | .number = 1, | 337 | .number = 1, |
339 | .nrprocs = sizeof(nfs4_cb_procedures)/sizeof(nfs4_cb_procedures[0]), | 338 | .nrprocs = sizeof(nfs4_cb_procedures)/sizeof(nfs4_cb_procedures[0]), |
340 | .procs = nfs4_cb_procedures | 339 | .procs = nfs4_cb_procedures |
@@ -348,7 +347,7 @@ static struct rpc_version * nfs_cb_version[] = { | |||
348 | /* | 347 | /* |
349 | * Use the SETCLIENTID credential | 348 | * Use the SETCLIENTID credential |
350 | */ | 349 | */ |
351 | struct rpc_cred * | 350 | static struct rpc_cred * |
352 | nfsd4_lookupcred(struct nfs4_client *clp, int taskflags) | 351 | nfsd4_lookupcred(struct nfs4_client *clp, int taskflags) |
353 | { | 352 | { |
354 | struct auth_cred acred; | 353 | struct auth_cred acred; |
@@ -387,9 +386,7 @@ nfsd4_probe_callback(struct nfs4_client *clp) | |||
387 | char hostname[32]; | 386 | char hostname[32]; |
388 | int status; | 387 | int status; |
389 | 388 | ||
390 | dprintk("NFSD: probe_callback. cb_parsed %d cb_set %d\n", | 389 | if (atomic_read(&cb->cb_set)) |
391 | cb->cb_parsed, atomic_read(&cb->cb_set)); | ||
392 | if (!cb->cb_parsed || atomic_read(&cb->cb_set)) | ||
393 | return; | 390 | return; |
394 | 391 | ||
395 | /* Initialize address */ | 392 | /* Initialize address */ |
@@ -427,10 +424,10 @@ nfsd4_probe_callback(struct nfs4_client *clp) | |||
427 | * XXX AUTH_UNIX only - need AUTH_GSS.... | 424 | * XXX AUTH_UNIX only - need AUTH_GSS.... |
428 | */ | 425 | */ |
429 | sprintf(hostname, "%u.%u.%u.%u", NIPQUAD(addr.sin_addr.s_addr)); | 426 | sprintf(hostname, "%u.%u.%u.%u", NIPQUAD(addr.sin_addr.s_addr)); |
430 | clnt = rpc_create_client(xprt, hostname, program, 1, RPC_AUTH_UNIX); | 427 | clnt = rpc_new_client(xprt, hostname, program, 1, RPC_AUTH_UNIX); |
431 | if (IS_ERR(clnt)) { | 428 | if (IS_ERR(clnt)) { |
432 | dprintk("NFSD: couldn't create callback client\n"); | 429 | dprintk("NFSD: couldn't create callback client\n"); |
433 | goto out_xprt; | 430 | goto out_err; |
434 | } | 431 | } |
435 | clnt->cl_intr = 0; | 432 | clnt->cl_intr = 0; |
436 | clnt->cl_softrtry = 1; | 433 | clnt->cl_softrtry = 1; |
@@ -465,8 +462,6 @@ out_rpciod: | |||
465 | out_clnt: | 462 | out_clnt: |
466 | rpc_shutdown_client(clnt); | 463 | rpc_shutdown_client(clnt); |
467 | goto out_err; | 464 | goto out_err; |
468 | out_xprt: | ||
469 | xprt_destroy(xprt); | ||
470 | out_err: | 465 | out_err: |
471 | dprintk("NFSD: warning: no callback path to client %.*s\n", | 466 | dprintk("NFSD: warning: no callback path to client %.*s\n", |
472 | (int)clp->cl_name.len, clp->cl_name.data); | 467 | (int)clp->cl_name.len, clp->cl_name.data); |