[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110605130207.GE11521@ZenIV.linux.org.uk>
Date: Sun, 5 Jun 2011 14:02:07 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: linux-nfs@...r.kernel.org
Cc: Chuck Lever <chuck.lever@...cle.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] fix return values of rpcb_create_local()
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@...iv.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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists