提交 6d59b8d5 编写于 作者: S Stanislav Kinsbursky 提交者: Trond Myklebust

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: NStanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 e50a7a1a
...@@ -647,7 +647,7 @@ static int nfs_create_rpc_client(struct nfs_client *clp, ...@@ -647,7 +647,7 @@ static int nfs_create_rpc_client(struct nfs_client *clp,
{ {
struct rpc_clnt *clnt = NULL; struct rpc_clnt *clnt = NULL;
struct rpc_create_args args = { struct rpc_create_args args = {
.net = &init_net, .net = clp->net,
.protocol = clp->cl_proto, .protocol = clp->cl_proto,
.address = (struct sockaddr *)&clp->cl_addr, .address = (struct sockaddr *)&clp->cl_addr,
.addrsize = clp->cl_addrlen, .addrsize = clp->cl_addrlen,
......
...@@ -138,6 +138,7 @@ struct nfs_mount_request { ...@@ -138,6 +138,7 @@ struct nfs_mount_request {
int noresvport; int noresvport;
unsigned int *auth_flav_len; unsigned int *auth_flav_len;
rpc_authflavor_t *auth_flavs; rpc_authflavor_t *auth_flavs;
struct net *net;
}; };
extern int nfs_mount(struct nfs_mount_request *info); extern int nfs_mount(struct nfs_mount_request *info);
......
...@@ -153,7 +153,7 @@ int nfs_mount(struct nfs_mount_request *info) ...@@ -153,7 +153,7 @@ int nfs_mount(struct nfs_mount_request *info)
.rpc_resp = &result, .rpc_resp = &result,
}; };
struct rpc_create_args args = { struct rpc_create_args args = {
.net = &init_net, .net = info->net,
.protocol = info->protocol, .protocol = info->protocol,
.address = info->sap, .address = info->sap,
.addrsize = info->salen, .addrsize = info->salen,
...@@ -225,7 +225,7 @@ void nfs_umount(const struct nfs_mount_request *info) ...@@ -225,7 +225,7 @@ void nfs_umount(const struct nfs_mount_request *info)
.to_retries = 2, .to_retries = 2,
}; };
struct rpc_create_args args = { struct rpc_create_args args = {
.net = &init_net, .net = info->net,
.protocol = IPPROTO_UDP, .protocol = IPPROTO_UDP,
.address = info->sap, .address = info->sap,
.addrsize = info->salen, .addrsize = info->salen,
......
...@@ -1625,6 +1625,7 @@ static int nfs_try_mount(struct nfs_parsed_mount_data *args, ...@@ -1625,6 +1625,7 @@ static int nfs_try_mount(struct nfs_parsed_mount_data *args,
.noresvport = args->flags & NFS_MOUNT_NORESVPORT, .noresvport = args->flags & NFS_MOUNT_NORESVPORT,
.auth_flav_len = &server_authlist_len, .auth_flav_len = &server_authlist_len,
.auth_flavs = server_authlist, .auth_flavs = server_authlist,
.net = args->net,
}; };
int status; int status;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册