aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2011-01-05 21:04:27 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-01-06 14:46:23 -0500
commit16b2d1e1d12de000404d7c845d0db1226511f84d (patch)
tree8ad973bbcee7a1d5bb34ce855ef41324e253c181
parent1f11a034cdc4b45ee56d51b87a9e37cb776fb15b (diff)
SUNRPC register and unregister the back channel transport
Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--include/linux/sunrpc/svcsock.h1
-rw-r--r--net/sunrpc/svcsock.c20
2 files changed, 20 insertions, 1 deletions
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h
index 3a45a80760b9..1b353a76c304 100644
--- a/include/linux/sunrpc/svcsock.h
+++ b/include/linux/sunrpc/svcsock.h
@@ -45,7 +45,6 @@ int svc_sock_names(struct svc_serv *serv, char *buf,
45int svc_addsock(struct svc_serv *serv, const int fd, 45int svc_addsock(struct svc_serv *serv, const int fd,
46 char *name_return, const size_t len); 46 char *name_return, const size_t len);
47void svc_init_xprt_sock(void); 47void svc_init_xprt_sock(void);
48void svc_init_bc_xprt_sock(void);
49void svc_cleanup_xprt_sock(void); 48void svc_cleanup_xprt_sock(void);
50struct svc_xprt *svc_sock_create(struct svc_serv *serv, int prot); 49struct svc_xprt *svc_sock_create(struct svc_serv *serv, int prot);
51void svc_sock_destroy(struct svc_xprt *); 50void svc_sock_destroy(struct svc_xprt *);
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 6630f2922f40..e6b66d81115e 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1222,6 +1222,24 @@ static struct svc_xprt_class svc_tcp_bc_class = {
1222 .xcl_ops = &svc_tcp_bc_ops, 1222 .xcl_ops = &svc_tcp_bc_ops,
1223 .xcl_max_payload = RPCSVC_MAXPAYLOAD_TCP, 1223 .xcl_max_payload = RPCSVC_MAXPAYLOAD_TCP,
1224}; 1224};
1225
1226static void svc_init_bc_xprt_sock(void)
1227{
1228 svc_reg_xprt_class(&svc_tcp_bc_class);
1229}
1230
1231static void svc_cleanup_bc_xprt_sock(void)
1232{
1233 svc_unreg_xprt_class(&svc_tcp_bc_class);
1234}
1235#else /* CONFIG_NFS_V4_1 */
1236static void svc_init_bc_xprt_sock(void)
1237{
1238}
1239
1240static void svc_cleanup_bc_xprt_sock(void)
1241{
1242}
1225#endif /* CONFIG_NFS_V4_1 */ 1243#endif /* CONFIG_NFS_V4_1 */
1226 1244
1227static struct svc_xprt_ops svc_tcp_ops = { 1245static struct svc_xprt_ops svc_tcp_ops = {
@@ -1247,12 +1265,14 @@ void svc_init_xprt_sock(void)
1247{ 1265{
1248 svc_reg_xprt_class(&svc_tcp_class); 1266 svc_reg_xprt_class(&svc_tcp_class);
1249 svc_reg_xprt_class(&svc_udp_class); 1267 svc_reg_xprt_class(&svc_udp_class);
1268 svc_init_bc_xprt_sock();
1250} 1269}
1251 1270
1252void svc_cleanup_xprt_sock(void) 1271void svc_cleanup_xprt_sock(void)
1253{ 1272{
1254 svc_unreg_xprt_class(&svc_tcp_class); 1273 svc_unreg_xprt_class(&svc_tcp_class);
1255 svc_unreg_xprt_class(&svc_udp_class); 1274 svc_unreg_xprt_class(&svc_udp_class);
1275 svc_cleanup_bc_xprt_sock();
1256} 1276}
1257 1277
1258static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv) 1278static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv)