diff options
Diffstat (limited to 'fs/nfs/nfs4namespace.c')
| -rw-r--r-- | fs/nfs/nfs4namespace.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c index 4e7f05d3e9db..3d5dbf80d46a 100644 --- a/fs/nfs/nfs4namespace.c +++ b/fs/nfs/nfs4namespace.c | |||
| @@ -121,9 +121,8 @@ static int nfs4_validate_fspath(struct dentry *dentry, | |||
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | static size_t nfs_parse_server_name(char *string, size_t len, | 123 | static size_t nfs_parse_server_name(char *string, size_t len, |
| 124 | struct sockaddr *sa, size_t salen, struct nfs_server *server) | 124 | struct sockaddr *sa, size_t salen, struct net *net) |
| 125 | { | 125 | { |
| 126 | struct net *net = rpc_net_ns(server->client); | ||
| 127 | ssize_t ret; | 126 | ssize_t ret; |
| 128 | 127 | ||
| 129 | ret = rpc_pton(net, string, len, sa, salen); | 128 | ret = rpc_pton(net, string, len, sa, salen); |
| @@ -223,6 +222,7 @@ static struct vfsmount *try_location(struct nfs_clone_mount *mountdata, | |||
| 223 | const struct nfs4_fs_location *location) | 222 | const struct nfs4_fs_location *location) |
| 224 | { | 223 | { |
| 225 | const size_t addr_bufsize = sizeof(struct sockaddr_storage); | 224 | const size_t addr_bufsize = sizeof(struct sockaddr_storage); |
| 225 | struct net *net = rpc_net_ns(NFS_SB(mountdata->sb)->client); | ||
| 226 | struct vfsmount *mnt = ERR_PTR(-ENOENT); | 226 | struct vfsmount *mnt = ERR_PTR(-ENOENT); |
| 227 | char *mnt_path; | 227 | char *mnt_path; |
| 228 | unsigned int maxbuflen; | 228 | unsigned int maxbuflen; |
| @@ -248,8 +248,7 @@ static struct vfsmount *try_location(struct nfs_clone_mount *mountdata, | |||
| 248 | continue; | 248 | continue; |
| 249 | 249 | ||
| 250 | mountdata->addrlen = nfs_parse_server_name(buf->data, buf->len, | 250 | mountdata->addrlen = nfs_parse_server_name(buf->data, buf->len, |
| 251 | mountdata->addr, addr_bufsize, | 251 | mountdata->addr, addr_bufsize, net); |
| 252 | NFS_SB(mountdata->sb)); | ||
| 253 | if (mountdata->addrlen == 0) | 252 | if (mountdata->addrlen == 0) |
| 254 | continue; | 253 | continue; |
| 255 | 254 | ||
| @@ -419,6 +418,7 @@ static int nfs4_try_replacing_one_location(struct nfs_server *server, | |||
| 419 | const struct nfs4_fs_location *location) | 418 | const struct nfs4_fs_location *location) |
| 420 | { | 419 | { |
| 421 | const size_t addr_bufsize = sizeof(struct sockaddr_storage); | 420 | const size_t addr_bufsize = sizeof(struct sockaddr_storage); |
| 421 | struct net *net = rpc_net_ns(server->client); | ||
| 422 | struct sockaddr *sap; | 422 | struct sockaddr *sap; |
| 423 | unsigned int s; | 423 | unsigned int s; |
| 424 | size_t salen; | 424 | size_t salen; |
| @@ -440,7 +440,7 @@ static int nfs4_try_replacing_one_location(struct nfs_server *server, | |||
| 440 | continue; | 440 | continue; |
| 441 | 441 | ||
| 442 | salen = nfs_parse_server_name(buf->data, buf->len, | 442 | salen = nfs_parse_server_name(buf->data, buf->len, |
| 443 | sap, addr_bufsize, server); | 443 | sap, addr_bufsize, net); |
| 444 | if (salen == 0) | 444 | if (salen == 0) |
| 445 | continue; | 445 | continue; |
| 446 | rpc_set_port(sap, NFS_PORT); | 446 | rpc_set_port(sap, NFS_PORT); |
| @@ -450,7 +450,7 @@ static int nfs4_try_replacing_one_location(struct nfs_server *server, | |||
| 450 | if (hostname == NULL) | 450 | if (hostname == NULL) |
| 451 | break; | 451 | break; |
| 452 | 452 | ||
| 453 | error = nfs4_update_server(server, hostname, sap, salen); | 453 | error = nfs4_update_server(server, hostname, sap, salen, net); |
| 454 | kfree(hostname); | 454 | kfree(hostname); |
| 455 | if (error == 0) | 455 | if (error == 0) |
| 456 | break; | 456 | break; |
