aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-01-03 03:55:04 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-01-06 14:58:39 -0500
commit963d8fe53339128ee46a7701f2e36305f0ccff8c (patch)
tree426736c70a8e05cb1d945d5c7f44ea6475edd113 /fs/nfsd
parentabbcf28f23d53e8ec56a91f3528743913fa2694a (diff)
RPC: Clean up RPC task structure
Shrink the RPC task structure. Instead of storing separate pointers for task->tk_exit and task->tk_release, put them in a structure. Also pass the user data pointer as a parameter instead of passing it via task->tk_calldata. This enables us to nest callbacks. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4callback.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 583c0710e45e..cf92008f219a 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -53,7 +53,7 @@
53#define NFSPROC4_CB_COMPOUND 1 53#define NFSPROC4_CB_COMPOUND 1
54 54
55/* declarations */ 55/* declarations */
56static void nfs4_cb_null(struct rpc_task *task); 56static const struct rpc_call_ops nfs4_cb_null_ops;
57 57
58/* Index of predefined Linux callback client operations */ 58/* Index of predefined Linux callback client operations */
59 59
@@ -447,7 +447,7 @@ nfsd4_probe_callback(struct nfs4_client *clp)
447 msg.rpc_cred = nfsd4_lookupcred(clp,0); 447 msg.rpc_cred = nfsd4_lookupcred(clp,0);
448 if (IS_ERR(msg.rpc_cred)) 448 if (IS_ERR(msg.rpc_cred))
449 goto out_rpciod; 449 goto out_rpciod;
450 status = rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, nfs4_cb_null, NULL); 450 status = rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, &nfs4_cb_null_ops, NULL);
451 put_rpccred(msg.rpc_cred); 451 put_rpccred(msg.rpc_cred);
452 452
453 if (status != 0) { 453 if (status != 0) {
@@ -469,7 +469,7 @@ out_err:
469} 469}
470 470
471static void 471static void
472nfs4_cb_null(struct rpc_task *task) 472nfs4_cb_null(struct rpc_task *task, void *dummy)
473{ 473{
474 struct nfs4_client *clp = (struct nfs4_client *)task->tk_msg.rpc_argp; 474 struct nfs4_client *clp = (struct nfs4_client *)task->tk_msg.rpc_argp;
475 struct nfs4_callback *cb = &clp->cl_callback; 475 struct nfs4_callback *cb = &clp->cl_callback;
@@ -488,6 +488,10 @@ out:
488 put_nfs4_client(clp); 488 put_nfs4_client(clp);
489} 489}
490 490
491static const struct rpc_call_ops nfs4_cb_null_ops = {
492 .rpc_call_done = nfs4_cb_null,
493};
494
491/* 495/*
492 * called with dp->dl_count inc'ed. 496 * called with dp->dl_count inc'ed.
493 * nfs4_lock_state() may or may not have been called. 497 * nfs4_lock_state() may or may not have been called.