SUNRPC: Further cleanups

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust
2006-01-03 09:55:05 +01:00
parent 963d8fe533
commit 4ce70ada1f
4 changed files with 27 additions and 18 deletions

View File

@@ -554,6 +554,14 @@ __rpc_atrun(struct rpc_task *task)
rpc_wake_up_task(task);
}
/*
* Helper to call task->tk_ops->rpc_call_prepare
*/
static void rpc_prepare_task(struct rpc_task *task)
{
task->tk_ops->rpc_call_prepare(task, task->tk_calldata);
}
/*
* Helper that calls task->tk_ops->rpc_call_done if it exists
*/
@@ -756,6 +764,8 @@ void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, int flags, cons
task->tk_client = clnt;
task->tk_flags = flags;
task->tk_ops = tk_ops;
if (tk_ops->rpc_call_prepare != NULL)
task->tk_action = rpc_prepare_task;
task->tk_calldata = calldata;
/* Initialize retry counters */