diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-01-10 07:13:03 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-31 18:20:27 -0500 |
commit | 7bb782c6ac75898604eb547ed37b05c49b1edf21 (patch) | |
tree | 191154131d87eb61286b61c01f31fa3dd2de886d /fs/nfs | |
parent | 6d59b8d599d594bc314026c6856424fe49df5513 (diff) |
NFS: create callback transports in parent transport network namespace
This patch replaces static "init_net" references with parent transport xprt_net
reference. Thus callback transports will be created in the same network
namespace as respective NFS mount point was created.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/callback.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 516f3375e067..d81040a7efc4 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -102,11 +102,11 @@ nfs4_callback_svc(void *vrqstp) | |||
102 | * Prepare to bring up the NFSv4 callback service | 102 | * Prepare to bring up the NFSv4 callback service |
103 | */ | 103 | */ |
104 | struct svc_rqst * | 104 | struct svc_rqst * |
105 | nfs4_callback_up(struct svc_serv *serv) | 105 | nfs4_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt) |
106 | { | 106 | { |
107 | int ret; | 107 | int ret; |
108 | 108 | ||
109 | ret = svc_create_xprt(serv, "tcp", &init_net, PF_INET, | 109 | ret = svc_create_xprt(serv, "tcp", xprt->xprt_net, PF_INET, |
110 | nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); | 110 | nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); |
111 | if (ret <= 0) | 111 | if (ret <= 0) |
112 | goto out_err; | 112 | goto out_err; |
@@ -114,7 +114,7 @@ nfs4_callback_up(struct svc_serv *serv) | |||
114 | dprintk("NFS: Callback listener port = %u (af %u)\n", | 114 | dprintk("NFS: Callback listener port = %u (af %u)\n", |
115 | nfs_callback_tcpport, PF_INET); | 115 | nfs_callback_tcpport, PF_INET); |
116 | 116 | ||
117 | ret = svc_create_xprt(serv, "tcp", &init_net, PF_INET6, | 117 | ret = svc_create_xprt(serv, "tcp", xprt->xprt_net, PF_INET6, |
118 | nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); | 118 | nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); |
119 | if (ret > 0) { | 119 | if (ret > 0) { |
120 | nfs_callback_tcpport6 = ret; | 120 | nfs_callback_tcpport6 = ret; |
@@ -183,7 +183,7 @@ nfs41_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt) | |||
183 | * fore channel connection. | 183 | * fore channel connection. |
184 | * Returns the input port (0) and sets the svc_serv bc_xprt on success | 184 | * Returns the input port (0) and sets the svc_serv bc_xprt on success |
185 | */ | 185 | */ |
186 | ret = svc_create_xprt(serv, "tcp-bc", &init_net, PF_INET, 0, | 186 | ret = svc_create_xprt(serv, "tcp-bc", xprt->xprt_net, PF_INET, 0, |
187 | SVC_SOCK_ANONYMOUS); | 187 | SVC_SOCK_ANONYMOUS); |
188 | if (ret < 0) { | 188 | if (ret < 0) { |
189 | rqstp = ERR_PTR(ret); | 189 | rqstp = ERR_PTR(ret); |
@@ -269,7 +269,7 @@ int nfs_callback_up(u32 minorversion, struct rpc_xprt *xprt) | |||
269 | serv, xprt, &rqstp, &callback_svc); | 269 | serv, xprt, &rqstp, &callback_svc); |
270 | if (!minorversion_setup) { | 270 | if (!minorversion_setup) { |
271 | /* v4.0 callback setup */ | 271 | /* v4.0 callback setup */ |
272 | rqstp = nfs4_callback_up(serv); | 272 | rqstp = nfs4_callback_up(serv, xprt); |
273 | callback_svc = nfs4_callback_svc; | 273 | callback_svc = nfs4_callback_svc; |
274 | } | 274 | } |
275 | 275 | ||