From: "J. Bruce Fields" <bfields@fieldses.org>
To: Pavel Emelyanov <xemul@parallels.com>
Cc: Chuck Lever <chuck.lever@oracle.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
Trond Myklebust <trond@netapp.com>
Subject: Re: [PATCH v2] sunrpc: Don't return NULL from rpcb_create
Date: Mon, 11 Oct 2010 20:03:42 -0400 [thread overview]
Message-ID: <20101012000342.GE16442@fieldses.org> (raw)
In-Reply-To: <4CAC4554.7020001@parallels.com>
On Wed, Oct 06, 2010 at 01:45:56PM +0400, Pavel Emelyanov wrote:
> > The reason for this is in the future, we may want to support additional
> > address family types. We should, therefore, ensure that every piece of
> > code that is sensitive to address families fail in some orderly manner
> > to let developers know where a change is needed.
>
> Makes sense. I was under impression, that AF-s other than INET are not
> cared about at all :(
Also leaving the rest of these to Trond; poke me if you need me to merge
anything more....
--b.
>
> Here's a fixed version of the patch.
>
> Log:
>
> Its callers check for ERR_PTR.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
> ---
>
> net/sunrpc/rpcb_clnt.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
> index 83af38d..1ef2d41 100644
> --- a/net/sunrpc/rpcb_clnt.c
> +++ b/net/sunrpc/rpcb_clnt.c
> @@ -249,7 +249,7 @@ static struct rpc_clnt *rpcb_create(char *hostname, struct sockaddr *srvaddr,
> ((struct sockaddr_in6 *)srvaddr)->sin6_port = htons(RPCBIND_PORT);
> break;
> default:
> - return NULL;
> + return ERR_PTR(-EAFNOSUPPORT);
> }
>
> return rpc_create(&args);
> --
> 1.5.5.6
>
prev parent reply other threads:[~2010-10-12 0:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 16:48 [PATCH] sunrpc: Don't return NULL from rpcb_create Pavel Emelyanov
2010-10-06 2:55 ` Chuck Lever
2010-10-06 9:45 ` [PATCH v2] " Pavel Emelyanov
2010-10-12 0:03 ` J. Bruce Fields [this message]
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=20101012000342.GE16442@fieldses.org \
--to=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond@netapp.com \
--cc=xemul@parallels.com \
/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;
as well as URLs for NNTP newsgroup(s).