From: Chuck Lever <chuck.lever@oracle.com>
To: James Lentini <jlentini@netapp.com>
Cc: nfs@lists.sourceforge.net, trond.myklebust@fys.uio.no
Subject: Re: [PATCH 03/27] SUNRPC: Check a return result
Date: Tue, 30 Oct 2007 12:49:46 -0400 [thread overview]
Message-ID: <472760AA.2010901@oracle.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0710301232070.32008@jlentini-linux.nane.netapp.com>
[-- Attachment #1: Type: text/plain, Size: 2048 bytes --]
James Lentini wrote:
> On Fri, 26 Oct 2007, Chuck Lever wrote:
>
>> Minor: Replace an empty if statement with a debugging dprintk.
>>
>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>> Cc: Thomas Talpey <Thomas.Talpey@netapp.com>
>> ---
>>
>> net/sunrpc/xprtrdma/verbs.c | 8 +++++---
>> 1 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
>> index 44b0fb9..ffbf22a 100644
>> --- a/net/sunrpc/xprtrdma/verbs.c
>> +++ b/net/sunrpc/xprtrdma/verbs.c
>> @@ -522,7 +522,7 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
>> struct rpcrdma_create_data_internal *cdata)
>> {
>> struct ib_device_attr devattr;
>> - int rc;
>> + int rc, err;
>>
>> rc = ib_query_device(ia->ri_id->device, &devattr);
>> if (rc) {
>> @@ -648,8 +648,10 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
>> return 0;
>>
>> out2:
>> - if (ib_destroy_cq(ep->rep_cq))
>> - ;
>> + err = ib_destroy_cq(ep->rep_cq);
>> + if (err)
>> + dprintk("RPC: %s: ib_destroy_cq returned %i\n",
>> + __func__, err);
>> out1:
>> return rc;
>> }
>
> Good eyes, Chuck. One minor suggestion: instead of adding "err", how
> about reusing "rc"? Here's a patch against Trond's nfs-2.6 tree.
I added "err" because it appeared that the intention of the original
logic was to ignore the return code from ib_destroy_cq() completely.
Thus re-using "rc" would have made rpcrdma_ep_create() return an
unnecessary error in cases where it hadn't before.
> Signed-off-by: James Lentini <jlentini@netapp.com>
>
> verbs.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> --- a/net/sunrpc/xprtrdma/verbs.c
> +++ b/net/sunrpc/xprtrdma/verbs.c
> @@ -648,8 +648,10 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep,
> return 0;
>
> out2:
> - if (ib_destroy_cq(ep->rep_cq))
> - ;
> + rc = ib_destroy_cq(ep->rep_cq);
> + if (rc)
> + dprintk("RPC: %s: ib_destroy_cq returned %i\n",
> + __func__, rc);
> out1:
> return rc;
> }
[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 259 bytes --]
begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
version:2.1
end:vcard
[-- Attachment #3: Type: text/plain, Size: 314 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
[-- Attachment #4: Type: text/plain, Size: 140 bytes --]
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2007-10-30 16:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 17:30 [PATCH 03/27] SUNRPC: Check a return result Chuck Lever
2007-10-30 16:42 ` James Lentini
2007-10-30 16:49 ` Chuck Lever [this message]
2007-10-30 16:59 ` Talpey, Thomas
2007-10-30 17:09 ` James Lentini
2007-10-30 16:56 ` Trond Myklebust
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=472760AA.2010901@oracle.com \
--to=chuck.lever@oracle.com \
--cc=jlentini@netapp.com \
--cc=nfs@lists.sourceforge.net \
--cc=trond.myklebust@fys.uio.no \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox