aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/rpcb_clnt.c2
-rw-r--r--net/sunrpc/svc.c18
2 files changed, 12 insertions, 8 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 8ea8907d4b8d..beee6da33035 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -194,7 +194,7 @@ static int rpcb_register_call(const u32 version, struct rpc_message *msg)
194 error = PTR_ERR(rpcb_clnt); 194 error = PTR_ERR(rpcb_clnt);
195 195
196 if (error < 0) { 196 if (error < 0) {
197 printk(KERN_WARNING "RPC: failed to contact local rpcbind " 197 dprintk("RPC: failed to contact local rpcbind "
198 "server (errno %d).\n", -error); 198 "server (errno %d).\n", -error);
199 return error; 199 return error;
200 } 200 }
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 142f64745fba..8ba654bdd608 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -818,26 +818,30 @@ static int __svc_rpcb_register6(const u32 program, const u32 version,
818 * Returns zero on success; a negative errno value is returned 818 * Returns zero on success; a negative errno value is returned
819 * if any error occurs. 819 * if any error occurs.
820 */ 820 */
821static int __svc_register(const u32 program, const u32 version, 821static int __svc_register(const char *progname,
822 const u32 program, const u32 version,
822 const int family, 823 const int family,
823 const unsigned short protocol, 824 const unsigned short protocol,
824 const unsigned short port) 825 const unsigned short port)
825{ 826{
826 int error; 827 int error = -EAFNOSUPPORT;
827 828
828 switch (family) { 829 switch (family) {
829 case PF_INET: 830 case PF_INET:
830 return __svc_rpcb_register4(program, version, 831 error = __svc_rpcb_register4(program, version,
831 protocol, port); 832 protocol, port);
832 break; 833 break;
833#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 834#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
834 case PF_INET6: 835 case PF_INET6:
835 return__svc_rpcb_register6(program, version, 836 error = __svc_rpcb_register6(program, version,
836 protocol, port); 837 protocol, port);
837#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ 838#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */
838 } 839 }
839 840
840 return -EAFNOSUPPORT; 841 if (error < 0)
842 printk(KERN_WARNING "svc: failed to register %sv%u RPC "
843 "service (errno %d).\n", progname, version, -error);
844 return error;
841} 845}
842 846
843/** 847/**
@@ -875,8 +879,8 @@ int svc_register(const struct svc_serv *serv, const int family,
875 if (progp->pg_vers[i]->vs_hidden) 879 if (progp->pg_vers[i]->vs_hidden)
876 continue; 880 continue;
877 881
878 error = __svc_register(progp->pg_prog, i, 882 error = __svc_register(progp->pg_name, progp->pg_prog,
879 family, proto, port); 883 i, family, proto, port);
880 if (error < 0) 884 if (error < 0)
881 break; 885 break;
882 } 886 }