From: Dan Carpenter <error27@gmail.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Benny Halevy <bhalevy@panasas.com>,
Andy Adamson <andros@netapp.com>,
Alexandros Batsakis <batsakis@netapp.com>,
Ricardo Labiaga <Ricardo.Labiaga@netapp.com>,
linux-nfs@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] nfs: fix some issues in nfs41_proc_reclaim_complete()
Date: Thu, 22 Apr 2010 09:28:39 +0000 [thread overview]
Message-ID: <20100422092839.GI29647@bicker> (raw)
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>
---
This was found by smatch and I've only compile tested it. Sorry. :/
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;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Benny Halevy <bhalevy@panasas.com>,
Andy Adamson <andros@netapp.com>,
Alexandros Batsakis <batsakis@netapp.com>,
Ricardo Labiaga <Ricardo.Labiaga@netapp.com>,
linux-nfs@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] nfs: fix some issues in nfs41_proc_reclaim_complete()
Date: Thu, 22 Apr 2010 11:28:39 +0200 [thread overview]
Message-ID: <20100422092839.GI29647@bicker> (raw)
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>
---
This was found by smatch and I've only compile tested it. Sorry. :/
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;
next reply other threads:[~2010-04-22 9:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 9:28 Dan Carpenter [this message]
2010-04-22 9:28 ` [patch] nfs: fix some issues in nfs41_proc_reclaim_complete() Dan Carpenter
2010-04-22 13:21 ` Benny Halevy
2010-04-22 13:21 ` Benny Halevy
2010-04-22 19:38 ` Dan Carpenter
2010-04-22 19:38 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100422092839.GI29647@bicker \
--to=error27@gmail.com \
--cc=Ricardo.Labiaga@netapp.com \
--cc=Trond.Myklebust@netapp.com \
--cc=andros@netapp.com \
--cc=batsakis@netapp.com \
--cc=bhalevy@panasas.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.