Skip to content

Commit

Permalink
nfs: fix some issues in nfs41_proc_reclaim_complete()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
error27 authored and Trond Myklebust committed Apr 28, 2010
1 parent ba8b06e commit acf82b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit acf82b8

Please sign in to comment.