]> git.karo-electronics.de Git - linux-beck.git/commitdiff
SUNRPC register and unregister the back channel transport
authorAndy Adamson <andros@netapp.com>
Thu, 6 Jan 2011 02:04:27 +0000 (02:04 +0000)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 6 Jan 2011 19:46:23 +0000 (14:46 -0500)
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
include/linux/sunrpc/svcsock.h
net/sunrpc/svcsock.c

index 3a45a80760b95aa696048f4f23dec75690ad273a..1b353a76c30492389bad8c12fb41ffcd901a2027 100644 (file)
@@ -45,7 +45,6 @@ int           svc_sock_names(struct svc_serv *serv, char *buf,
 int            svc_addsock(struct svc_serv *serv, const int fd,
                                        char *name_return, const size_t len);
 void           svc_init_xprt_sock(void);
-void           svc_init_bc_xprt_sock(void);
 void           svc_cleanup_xprt_sock(void);
 struct svc_xprt *svc_sock_create(struct svc_serv *serv, int prot);
 void           svc_sock_destroy(struct svc_xprt *);
index 6630f2922f40b642ed00d87c34a6e7ed3109abb9..e6b66d81115e652db6b314c99b252a44a41ab335 100644 (file)
@@ -1222,6 +1222,24 @@ static struct svc_xprt_class svc_tcp_bc_class = {
        .xcl_ops = &svc_tcp_bc_ops,
        .xcl_max_payload = RPCSVC_MAXPAYLOAD_TCP,
 };
+
+static void svc_init_bc_xprt_sock(void)
+{
+       svc_reg_xprt_class(&svc_tcp_bc_class);
+}
+
+static void svc_cleanup_bc_xprt_sock(void)
+{
+       svc_unreg_xprt_class(&svc_tcp_bc_class);
+}
+#else /* CONFIG_NFS_V4_1 */
+static void svc_init_bc_xprt_sock(void)
+{
+}
+
+static void svc_cleanup_bc_xprt_sock(void)
+{
+}
 #endif /* CONFIG_NFS_V4_1 */
 
 static struct svc_xprt_ops svc_tcp_ops = {
@@ -1247,12 +1265,14 @@ void svc_init_xprt_sock(void)
 {
        svc_reg_xprt_class(&svc_tcp_class);
        svc_reg_xprt_class(&svc_udp_class);
+       svc_init_bc_xprt_sock();
 }
 
 void svc_cleanup_xprt_sock(void)
 {
        svc_unreg_xprt_class(&svc_tcp_class);
        svc_unreg_xprt_class(&svc_udp_class);
+       svc_cleanup_bc_xprt_sock();
 }
 
 static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv)