From: Dan Carpenter Date: Thu, 22 Apr 2010 09:28:39 +0000 (+0200) Subject: nfs: fix some issues in nfs41_proc_reclaim_complete() X-Git-Tag: upstream/snapshot3+hdmi~14734^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=acf82b85a70f39786e3cbb1ffed8655bcc972424;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git nfs: fix some issues in nfs41_proc_reclaim_complete() The original code passed an ERR_PTR() to rpc_put_task() and instead of returning zero on success it returned -ENOMEM. Signed-off-by: Dan Carpenter Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 6380670..071fced 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -5218,9 +5218,12 @@ static int nfs41_proc_reclaim_complete(struct nfs_client *clp) msg.rpc_resp = &calldata->res; task_setup_data.callback_data = calldata; task = rpc_run_task(&task_setup_data); - if (IS_ERR(task)) + if (IS_ERR(task)) { status = PTR_ERR(task); + goto out; + } rpc_put_task(task); + return 0; out: dprintk("<-- %s status=%d\n", __func__, status); return status;