diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-08-18 23:34:00 (GMT) |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-09-29 22:13:37 (GMT) |
commit | 14aeb2118d6e9fd9ee988324c740a00c80979093 (patch) | |
tree | ca98af50a2e90fb782605ab6235c3a4b30c5b1a4 /net/sunrpc/svc.c | |
parent | b6632339e3afbcbb438a3c8935190ea22464fc99 (diff) | |
download | linux-fsl-qoriq-14aeb2118d6e9fd9ee988324c740a00c80979093.tar.xz |
SUNRPC: Simplify rpcb_register() API
Bruce suggested there's no need to expose the difference between an error
sending the PMAP_SET request and an error reply from the portmapper to
rpcb_register's callers. The user space equivalent of rpcb_register() is
pmap_set(3), which returns a bool_t : either the PMAP set worked, or it
didn't. Simple.
So let's remove the "*okay" argument from rpcb_register() and
rpcb_v4_register(), and simply return an error if any part of the call
didn't work.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r-- | net/sunrpc/svc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 9ba1704..9805143 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -730,7 +730,7 @@ svc_register(struct svc_serv *serv, int proto, unsigned short port) struct svc_program *progp; unsigned long flags; unsigned int i; - int error = 0, dummy; + int error = 0; if (!port) clear_thread_flag(TIF_SIGPENDING); @@ -751,13 +751,9 @@ svc_register(struct svc_serv *serv, int proto, unsigned short port) if (progp->pg_vers[i]->vs_hidden) continue; - error = rpcb_register(progp->pg_prog, i, proto, port, &dummy); + error = rpcb_register(progp->pg_prog, i, proto, port); if (error < 0) break; - if (port && !dummy) { - error = -EACCES; - break; - } } } |