* [PATCH] fix return values of rpcb_create_local()
@ 2011-06-05 13:02 Al Viro
2011-06-05 13:06 ` Andreas Schwab
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2011-06-05 13:02 UTC (permalink / raw)
To: linux-nfs; +Cc: Chuck Lever, linux-kernel
commit 7402ab19cdd5943c7dd4f3399afe3abda8077ef5 (SUNRPC: Use AF_LOCAL
for rpcbind upcalls) broke rpcb_create_local() error reporting in several
cases. Callers expect negative return value on error and until that commit
they used to get it in all failure exits. Now if rpc_create() fails we get
-PTR_ERR(clnt), i.e. *positive* value. Restore original behaviour...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 9a80a92..5efaf5f 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -193,7 +193,7 @@ static int rpcb_create_local_unix(void)
if (IS_ERR(clnt)) {
dprintk("RPC: failed to create AF_LOCAL rpcbind "
"client (errno %ld).\n", PTR_ERR(clnt));
- result = -PTR_ERR(clnt);
+ result = PTR_ERR(clnt);
goto out;
}
@@ -242,7 +242,7 @@ static int rpcb_create_local_net(void)
if (IS_ERR(clnt)) {
dprintk("RPC: failed to create local rpcbind "
"client (errno %ld).\n", PTR_ERR(clnt));
- result = -PTR_ERR(clnt);
+ result = PTR_ERR(clnt);
goto out;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] fix return values of rpcb_create_local()
2011-06-05 13:02 [PATCH] fix return values of rpcb_create_local() Al Viro
@ 2011-06-05 13:06 ` Andreas Schwab
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2011-06-05 13:06 UTC (permalink / raw)
To: Al Viro
Cc: public-linux-nfs-u79uwXL29TY76Z2rM5mHXA, Chuck Lever,
public-linux-kernel-u79uwXL29TY76Z2rM5mHXA
Al Viro <viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org> writes:
> diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
> index 9a80a92..5efaf5f 100644
> --- a/net/sunrpc/rpcb_clnt.c
> +++ b/net/sunrpc/rpcb_clnt.c
> @@ -193,7 +193,7 @@ static int rpcb_create_local_unix(void)
> if (IS_ERR(clnt)) {
> dprintk("RPC: failed to create AF_LOCAL rpcbind "
> "client (errno %ld).\n", PTR_ERR(clnt));
> - result = -PTR_ERR(clnt);
> + result = PTR_ERR(clnt);
> goto out;
> }
>
> @@ -242,7 +242,7 @@ static int rpcb_create_local_net(void)
> if (IS_ERR(clnt)) {
> dprintk("RPC: failed to create local rpcbind "
> "client (errno %ld).\n", PTR_ERR(clnt));
> - result = -PTR_ERR(clnt);
> + result = PTR_ERR(clnt);
Proabably the dprintk argument should be negated as well.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-05 13:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-05 13:02 [PATCH] fix return values of rpcb_create_local() Al Viro
2011-06-05 13:06 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox