aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-08-18 19:34:00 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-09-29 18:13:37 -0400
commit14aeb2118d6e9fd9ee988324c740a00c80979093 (patch)
treeca98af50a2e90fb782605ab6235c3a4b30c5b1a4 /net/sunrpc/svc.c
parentb6632339e3afbcbb438a3c8935190ea22464fc99 (diff)
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.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 9ba17044109d..9805143d0660 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)
730 struct svc_program *progp; 730 struct svc_program *progp;
731 unsigned long flags; 731 unsigned long flags;
732 unsigned int i; 732 unsigned int i;
733 int error = 0, dummy; 733 int error = 0;
734 734
735 if (!port) 735 if (!port)
736 clear_thread_flag(TIF_SIGPENDING); 736 clear_thread_flag(TIF_SIGPENDING);
@@ -751,13 +751,9 @@ svc_register(struct svc_serv *serv, int proto, unsigned short port)
751 if (progp->pg_vers[i]->vs_hidden) 751 if (progp->pg_vers[i]->vs_hidden)
752 continue; 752 continue;
753 753
754 error = rpcb_register(progp->pg_prog, i, proto, port, &dummy); 754 error = rpcb_register(progp->pg_prog, i, proto, port);
755 if (error < 0) 755 if (error < 0)
756 break; 756 break;
757 if (port && !dummy) {
758 error = -EACCES;
759 break;
760 }
761 } 757 }
762 } 758 }
763 759