From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 5/5] NFSD: Create PF_INET6 listener in write_ports
Date: Wed, 27 Jan 2010 17:04:17 -0500 [thread overview]
Message-ID: <20100127220417.GE18278@fieldses.org> (raw)
In-Reply-To: <09BF8C67-D7AA-4BBF-B310-5BBF7A4DA057@oracle.com>
On Wed, Jan 27, 2010 at 04:18:45PM -0500, Chuck Lever wrote:
>
> On Jan 26, 2010, at 6:30 PM, J. Bruce Fields wrote:
>> Any objection to moving the extra error-handling to the end, as in the
>> following? If there's no objection, I'll fold it into your last
>> patch.
>
> I guess that's fine, but out_close: would be more succinct than
> out_err_cleanup_inet, and somewhat more conventional.
Agreed, thanks. Applied, with that change.
--b.
>
>> --b.
>>
>> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
>> index f0a614e..f4474e5 100644
>> --- a/fs/nfsd/nfsctl.c
>> +++ b/fs/nfsd/nfsctl.c
>> @@ -988,6 +988,7 @@ static ssize_t __write_ports_delfd(char *buf)
>> static ssize_t __write_ports_addxprt(char *buf)
>> {
>> char transport[16];
>> + struct svc_xprt *xprt;
>> int port, err;
>>
>> if (sscanf(buf, "%15s %4u", transport, &port) != 2)
>> @@ -1007,18 +1008,15 @@ static ssize_t __write_ports_addxprt(char
>> *buf)
>>
>> err = svc_create_xprt(nfsd_serv, transport,
>> PF_INET6, port, SVC_SOCK_ANONYMOUS);
>> - if (err < 0 && err != -EAFNOSUPPORT) {
>> - struct svc_xprt *xprt;
>> - xprt = svc_find_xprt(nfsd_serv, transport, PF_INET, port);
>> - if (xprt != NULL) {
>> - svc_close_xprt(xprt);
>> - svc_xprt_put(xprt);
>> - }
>> - goto out_err;
>> - }
>> -
>> + if (err < 0 && err != -EAFNOSUPPORT)
>> + goto out_err_cleanup_inet;
>> return 0;
>> -
>> +out_err_cleanup_inet:
>> + xprt = svc_find_xprt(nfsd_serv, transport, PF_INET, port);
>> + if (xprt != NULL) {
>> + svc_close_xprt(xprt);
>> + svc_xprt_put(xprt);
>> + }
>> out_err:
>> /* Decrease the count, but don't shut down the service */
>> nfsd_serv->sv_nrthreads--;
>
> --
> Chuck Lever
> chuck[dot]lever[at]oracle[dot]com
>
>
>
>
next prev parent reply other threads:[~2010-01-27 22:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-26 19:03 [PATCH 0/5] Repost of remaining server-side IPv6 patches Chuck Lever
[not found] ` <20100126190214.3368.89388.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-01-26 19:03 ` [PATCH 1/5] SUNRPC: Use rpc_pton() in ip_map_parse() Chuck Lever
2010-01-26 19:03 ` [PATCH 2/5] NFSD: Support AF_INET6 in svc_addsock() function Chuck Lever
2010-01-26 19:04 ` [PATCH 3/5] SUNRPC: Bury "#ifdef IPV6" in svc_create_xprt() Chuck Lever
2010-01-26 19:04 ` [PATCH 4/5] SUNRPC: NFS kernel APIs shouldn't return ENOENT for "transport not found" Chuck Lever
2010-01-26 19:04 ` [PATCH 5/5] NFSD: Create PF_INET6 listener in write_ports Chuck Lever
[not found] ` <20100126190422.3368.3981.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-01-26 23:30 ` J. Bruce Fields
2010-01-27 21:18 ` Chuck Lever
2010-01-27 22:04 ` J. Bruce Fields [this message]
2010-01-26 23:30 ` [PATCH 0/5] Repost of remaining server-side IPv6 patches J. Bruce Fields
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=20100127220417.GE18278@fieldses.org \
--to=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--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.