nfs: fix some issues in nfs41_proc_reclaim_complete()
authorDan Carpenter <error27@gmail.com>
Thu, 22 Apr 2010 09:28:39 +0000 (11:28 +0200)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 28 Apr 2010 17:45:12 +0000 (13:45 -0400)
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 <error27@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c

index 638067007c65e8010c68f84710d6cc0a1e782158..071fcedd517caecc0ab7cd3cb38c482a3abf4a4d 100644 (file)
@@ -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;