[pnfs] [PATCH] nfs41: use rpc_call_sync in nfs4_proc_get_lease_time
Benny Halevy
bhalevy at panasas.com
Sun Mar 16 06:57:12 EDT 2008
I apologize, I was in to much of a hurry to send this out Friday.
I'm going to revert this patch and rework the fix.
Benny
On Mar. 14, 2008, 13:14 +0200, Benny Halevy <bhalevy at panasas.com> wrote:
> Current code abuses rpc_run_task while a synchronous rpc
> seems to be all it needs to do.
>
> Signed-off-by: Benny Halevy <bhalevy at panasas.com>
> ---
> fs/nfs/nfs4proc.c | 18 +-----------------
> 1 files changed, 1 insertions(+), 17 deletions(-)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index d0e9c5a..9270e7f 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -4522,24 +4522,8 @@ int nfs4_proc_get_lease_time(struct nfs_client *clp,
> .rpc_argp = &args,
> .rpc_resp = &res,
> };
> - struct rpc_task_setup task_setup = {
> - .rpc_client = session->clnt,
> - .rpc_message = &msg,
> - .callback_ops = &nfs4_get_lease_time_ops,
> - .callback_data = &data
> - };
> - int status;
> -
> - task = rpc_run_task(&task_setup);
>
> - if (IS_ERR(task))
> - status = PTR_ERR(task);
> - else {
> - status = task->tk_status;
> - rpc_put_task(task);
> - }
> -
> - return status;
> + return rpc_call_sync(clp->cl_rpcclient, &msg, 0);
> }
>
> /* Initialize a slot table */
More information about the pNFS
mailing list