Message ID | 1454706518-4641-2-git-send-email-andros@netapp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Feb 5, 2016 at 4:08 PM, <andros@netapp.com> wrote: > From: Andy Adamson <andros@netapp.com> > > Caller rpc_clnt_add_xprt() expects zero on success. > > Signed-off-by: Andy Adamson <andros@netapp.com> > --- > net/sunrpc/clnt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c > index efd6ffc..c0469d1 100644 > --- a/net/sunrpc/clnt.c > +++ b/net/sunrpc/clnt.c > @@ -2573,7 +2573,7 @@ int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt, > if (IS_ERR(task)) > return PTR_ERR(task); > rpc_put_task(task); > - return 1; > + return 0; > } > EXPORT_SYMBOL_GPL(rpc_clnt_test_and_add_xprt); Which is why we return 1. :-) The point of doing so is to ensure we do not add the xprt until the connection has been tested. Cheers Trond -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index efd6ffc..c0469d1 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2573,7 +2573,7 @@ int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt, if (IS_ERR(task)) return PTR_ERR(task); rpc_put_task(task); - return 1; + return 0; } EXPORT_SYMBOL_GPL(rpc_clnt_test_and_add_xprt);