diff options
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index af04f779ce9..767d494de7a 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -51,6 +51,8 @@ | |||
51 | #include <linux/sunrpc/stats.h> | 51 | #include <linux/sunrpc/stats.h> |
52 | #include <linux/sunrpc/xprt.h> | 52 | #include <linux/sunrpc/xprt.h> |
53 | 53 | ||
54 | #include "sunrpc.h" | ||
55 | |||
54 | #define RPCDBG_FACILITY RPCDBG_SVCXPRT | 56 | #define RPCDBG_FACILITY RPCDBG_SVCXPRT |
55 | 57 | ||
56 | 58 | ||
@@ -66,12 +68,12 @@ static void svc_sock_free(struct svc_xprt *); | |||
66 | static struct svc_xprt *svc_create_socket(struct svc_serv *, int, | 68 | static struct svc_xprt *svc_create_socket(struct svc_serv *, int, |
67 | struct net *, struct sockaddr *, | 69 | struct net *, struct sockaddr *, |
68 | int, int); | 70 | int, int); |
69 | #if defined(CONFIG_NFS_V4_1) | 71 | #if defined(CONFIG_SUNRPC_BACKCHANNEL) |
70 | static struct svc_xprt *svc_bc_create_socket(struct svc_serv *, int, | 72 | static struct svc_xprt *svc_bc_create_socket(struct svc_serv *, int, |
71 | struct net *, struct sockaddr *, | 73 | struct net *, struct sockaddr *, |
72 | int, int); | 74 | int, int); |
73 | static void svc_bc_sock_free(struct svc_xprt *xprt); | 75 | static void svc_bc_sock_free(struct svc_xprt *xprt); |
74 | #endif /* CONFIG_NFS_V4_1 */ | 76 | #endif /* CONFIG_SUNRPC_BACKCHANNEL */ |
75 | 77 | ||
76 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 78 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
77 | static struct lock_class_key svc_key[2]; | 79 | static struct lock_class_key svc_key[2]; |
@@ -1241,7 +1243,7 @@ static struct svc_xprt *svc_tcp_create(struct svc_serv *serv, | |||
1241 | return svc_create_socket(serv, IPPROTO_TCP, net, sa, salen, flags); | 1243 | return svc_create_socket(serv, IPPROTO_TCP, net, sa, salen, flags); |
1242 | } | 1244 | } |
1243 | 1245 | ||
1244 | #if defined(CONFIG_NFS_V4_1) | 1246 | #if defined(CONFIG_SUNRPC_BACKCHANNEL) |
1245 | static struct svc_xprt *svc_bc_create_socket(struct svc_serv *, int, | 1247 | static struct svc_xprt *svc_bc_create_socket(struct svc_serv *, int, |
1246 | struct net *, struct sockaddr *, | 1248 | struct net *, struct sockaddr *, |
1247 | int, int); | 1249 | int, int); |
@@ -1282,7 +1284,7 @@ static void svc_cleanup_bc_xprt_sock(void) | |||
1282 | { | 1284 | { |
1283 | svc_unreg_xprt_class(&svc_tcp_bc_class); | 1285 | svc_unreg_xprt_class(&svc_tcp_bc_class); |
1284 | } | 1286 | } |
1285 | #else /* CONFIG_NFS_V4_1 */ | 1287 | #else /* CONFIG_SUNRPC_BACKCHANNEL */ |
1286 | static void svc_init_bc_xprt_sock(void) | 1288 | static void svc_init_bc_xprt_sock(void) |
1287 | { | 1289 | { |
1288 | } | 1290 | } |
@@ -1290,7 +1292,7 @@ static void svc_init_bc_xprt_sock(void) | |||
1290 | static void svc_cleanup_bc_xprt_sock(void) | 1292 | static void svc_cleanup_bc_xprt_sock(void) |
1291 | { | 1293 | { |
1292 | } | 1294 | } |
1293 | #endif /* CONFIG_NFS_V4_1 */ | 1295 | #endif /* CONFIG_SUNRPC_BACKCHANNEL */ |
1294 | 1296 | ||
1295 | static struct svc_xprt_ops svc_tcp_ops = { | 1297 | static struct svc_xprt_ops svc_tcp_ops = { |
1296 | .xpo_create = svc_tcp_create, | 1298 | .xpo_create = svc_tcp_create, |
@@ -1621,7 +1623,7 @@ static void svc_sock_free(struct svc_xprt *xprt) | |||
1621 | kfree(svsk); | 1623 | kfree(svsk); |
1622 | } | 1624 | } |
1623 | 1625 | ||
1624 | #if defined(CONFIG_NFS_V4_1) | 1626 | #if defined(CONFIG_SUNRPC_BACKCHANNEL) |
1625 | /* | 1627 | /* |
1626 | * Create a back channel svc_xprt which shares the fore channel socket. | 1628 | * Create a back channel svc_xprt which shares the fore channel socket. |
1627 | */ | 1629 | */ |
@@ -1660,4 +1662,4 @@ static void svc_bc_sock_free(struct svc_xprt *xprt) | |||
1660 | if (xprt) | 1662 | if (xprt) |
1661 | kfree(container_of(xprt, struct svc_sock, sk_xprt)); | 1663 | kfree(container_of(xprt, struct svc_sock, sk_xprt)); |
1662 | } | 1664 | } |
1663 | #endif /* CONFIG_NFS_V4_1 */ | 1665 | #endif /* CONFIG_SUNRPC_BACKCHANNEL */ |