aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-01-10 07:12:54 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-01-31 18:20:27 -0500
commit6d59b8d599d594bc314026c6856424fe49df5513 (patch)
tree6ace028f324807f18c07653d5efbe782533e4ed9
parente50a7a1a42335243c94eeea4a8d23413cb02370d (diff)
NFS: pass NFS client owner network namespace to RPC client creation routine
This patch replaces static "init_net" with nfs_client->net pointer in RPC client creation calls. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/client.c2
-rw-r--r--fs/nfs/internal.h1
-rw-r--r--fs/nfs/mount_clnt.c4
-rw-r--r--fs/nfs/super.c1
4 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index ca016fe44602..64815b725409 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -647,7 +647,7 @@ static int nfs_create_rpc_client(struct nfs_client *clp,
647{ 647{
648 struct rpc_clnt *clnt = NULL; 648 struct rpc_clnt *clnt = NULL;
649 struct rpc_create_args args = { 649 struct rpc_create_args args = {
650 .net = &init_net, 650 .net = clp->net,
651 .protocol = clp->cl_proto, 651 .protocol = clp->cl_proto,
652 .address = (struct sockaddr *)&clp->cl_addr, 652 .address = (struct sockaddr *)&clp->cl_addr,
653 .addrsize = clp->cl_addrlen, 653 .addrsize = clp->cl_addrlen,
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 02fb2001a283..d602188f889f 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -138,6 +138,7 @@ struct nfs_mount_request {
138 int noresvport; 138 int noresvport;
139 unsigned int *auth_flav_len; 139 unsigned int *auth_flav_len;
140 rpc_authflavor_t *auth_flavs; 140 rpc_authflavor_t *auth_flavs;
141 struct net *net;
141}; 142};
142 143
143extern int nfs_mount(struct nfs_mount_request *info); 144extern int nfs_mount(struct nfs_mount_request *info);
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index d4c2d6b7507e..4fbe3a8e5e6b 100644
--- a/fs/nfs/mount_clnt.c
+++ b/fs/nfs/mount_clnt.c
@@ -153,7 +153,7 @@ int nfs_mount(struct nfs_mount_request *info)
153 .rpc_resp = &result, 153 .rpc_resp = &result,
154 }; 154 };
155 struct rpc_create_args args = { 155 struct rpc_create_args args = {
156 .net = &init_net, 156 .net = info->net,
157 .protocol = info->protocol, 157 .protocol = info->protocol,
158 .address = info->sap, 158 .address = info->sap,
159 .addrsize = info->salen, 159 .addrsize = info->salen,
@@ -225,7 +225,7 @@ void nfs_umount(const struct nfs_mount_request *info)
225 .to_retries = 2, 225 .to_retries = 2,
226 }; 226 };
227 struct rpc_create_args args = { 227 struct rpc_create_args args = {
228 .net = &init_net, 228 .net = info->net,
229 .protocol = IPPROTO_UDP, 229 .protocol = IPPROTO_UDP,
230 .address = info->sap, 230 .address = info->sap,
231 .addrsize = info->salen, 231 .addrsize = info->salen,
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 73aa75649bf8..e45feb0fee59 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1625,6 +1625,7 @@ static int nfs_try_mount(struct nfs_parsed_mount_data *args,
1625 .noresvport = args->flags & NFS_MOUNT_NORESVPORT, 1625 .noresvport = args->flags & NFS_MOUNT_NORESVPORT,
1626 .auth_flav_len = &server_authlist_len, 1626 .auth_flav_len = &server_authlist_len,
1627 .auth_flavs = server_authlist, 1627 .auth_flavs = server_authlist,
1628 .net = args->net,
1628 }; 1629 };
1629 int status; 1630 int status;
1630 1631