diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2009-03-18 20:46:36 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-03-28 15:55:06 -0400 |
commit | 26298caacac3e4754194b13aef377706d5de6cf6 (patch) | |
tree | ca5bcec9c81af2ad5f7d8b4dc91fd3a22aee71f4 /fs | |
parent | 49a9072f29a1039f142ec98b44a72d7173651c02 (diff) |
NFS: Revert creation of IPv6 listeners for lockd and NFSv4 callbacks
We're about to convert over to using separate PF_INET and PF_INET6
listeners, instead of a single PF_INET6 listener that also receives
AF_INET requests and maps them to AF_INET6.
Clear the way by removing the logic in lockd and the NFSv4 callback
server that creates an AF_INET6 service listener.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/lockd/svc.c | 13 | ||||
-rw-r--r-- | fs/nfs/callback.c | 14 |
2 files changed, 3 insertions, 24 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index d30920038cb6..566932b98fd3 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c | |||
@@ -53,17 +53,6 @@ static struct svc_rqst *nlmsvc_rqst; | |||
53 | unsigned long nlmsvc_timeout; | 53 | unsigned long nlmsvc_timeout; |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * If the kernel has IPv6 support available, always listen for | ||
57 | * both AF_INET and AF_INET6 requests. | ||
58 | */ | ||
59 | #if (defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)) && \ | ||
60 | defined(CONFIG_SUNRPC_REGISTER_V4) | ||
61 | static const sa_family_t nlmsvc_family = AF_INET6; | ||
62 | #else /* (CONFIG_IPV6 || CONFIG_IPV6_MODULE) && CONFIG_SUNRPC_REGISTER_V4 */ | ||
63 | static const sa_family_t nlmsvc_family = AF_INET; | ||
64 | #endif /* (CONFIG_IPV6 || CONFIG_IPV6_MODULE) && CONFIG_SUNRPC_REGISTER_V4 */ | ||
65 | |||
66 | /* | ||
67 | * These can be set at insmod time (useful for NFS as root filesystem), | 56 | * These can be set at insmod time (useful for NFS as root filesystem), |
68 | * and also changed through the sysctl interface. -- Jamie Lokier, Aug 2003 | 57 | * and also changed through the sysctl interface. -- Jamie Lokier, Aug 2003 |
69 | */ | 58 | */ |
@@ -211,7 +200,7 @@ static int create_lockd_listener(struct svc_serv *serv, char *name, | |||
211 | 200 | ||
212 | xprt = svc_find_xprt(serv, name, 0, 0); | 201 | xprt = svc_find_xprt(serv, name, 0, 0); |
213 | if (xprt == NULL) | 202 | if (xprt == NULL) |
214 | return svc_create_xprt(serv, name, nlmsvc_family, | 203 | return svc_create_xprt(serv, name, PF_INET, |
215 | port, SVC_SOCK_DEFAULTS); | 204 | port, SVC_SOCK_DEFAULTS); |
216 | 205 | ||
217 | svc_xprt_put(xprt); | 206 | svc_xprt_put(xprt); |
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index ddf4b4ae6967..0ef47dff89be 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -41,16 +41,6 @@ unsigned short nfs_callback_tcpport; | |||
41 | static const int nfs_set_port_min = 0; | 41 | static const int nfs_set_port_min = 0; |
42 | static const int nfs_set_port_max = 65535; | 42 | static const int nfs_set_port_max = 65535; |
43 | 43 | ||
44 | /* | ||
45 | * If the kernel has IPv6 support available, always listen for | ||
46 | * both AF_INET and AF_INET6 requests. | ||
47 | */ | ||
48 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
49 | static const sa_family_t nfs_callback_family = AF_INET6; | ||
50 | #else | ||
51 | static const sa_family_t nfs_callback_family = AF_INET; | ||
52 | #endif | ||
53 | |||
54 | static int param_set_port(const char *val, struct kernel_param *kp) | 44 | static int param_set_port(const char *val, struct kernel_param *kp) |
55 | { | 45 | { |
56 | char *endp; | 46 | char *endp; |
@@ -121,13 +111,13 @@ int nfs_callback_up(void) | |||
121 | if (!serv) | 111 | if (!serv) |
122 | goto out_err; | 112 | goto out_err; |
123 | 113 | ||
124 | ret = svc_create_xprt(serv, "tcp", nfs_callback_family, | 114 | ret = svc_create_xprt(serv, "tcp", PF_INET, |
125 | nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); | 115 | nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); |
126 | if (ret <= 0) | 116 | if (ret <= 0) |
127 | goto out_err; | 117 | goto out_err; |
128 | nfs_callback_tcpport = ret; | 118 | nfs_callback_tcpport = ret; |
129 | dprintk("NFS: Callback listener port = %u (af %u)\n", | 119 | dprintk("NFS: Callback listener port = %u (af %u)\n", |
130 | nfs_callback_tcpport, nfs_callback_family); | 120 | nfs_callback_tcpport, PF_INET); |
131 | 121 | ||
132 | nfs_callback_info.rqst = svc_prepare_thread(serv, &serv->sv_pools[0]); | 122 | nfs_callback_info.rqst = svc_prepare_thread(serv, &serv->sv_pools[0]); |
133 | if (IS_ERR(nfs_callback_info.rqst)) { | 123 | if (IS_ERR(nfs_callback_info.rqst)) { |