diff options
author | J. Bruce Fields <bfields@fieldses.org> | 2006-10-20 02:28:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-20 13:26:39 -0400 |
commit | 7d9ac06f26fe8d477c813405f1a8c7c90eecef2d (patch) | |
tree | 6886201ba51ae48bcb8a912c0b63da7af57cb014 | |
parent | eda3cef8dd2b83875affe82595db9d0c278879b2 (diff) |
[PATCH] nfs4: initialize cl_ipaddr
David forgot to do this. I'm not sure if this is the right place to put
it....
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/nfs/client.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 34c3996bd0f5..8b123f6a7d02 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -849,6 +849,7 @@ error: | |||
849 | */ | 849 | */ |
850 | static int nfs4_init_client(struct nfs_client *clp, | 850 | static int nfs4_init_client(struct nfs_client *clp, |
851 | int proto, int timeo, int retrans, | 851 | int proto, int timeo, int retrans, |
852 | const char *ip_addr, | ||
852 | rpc_authflavor_t authflavour) | 853 | rpc_authflavor_t authflavour) |
853 | { | 854 | { |
854 | int error; | 855 | int error; |
@@ -865,6 +866,7 @@ static int nfs4_init_client(struct nfs_client *clp, | |||
865 | error = nfs_create_rpc_client(clp, proto, timeo, retrans, authflavour); | 866 | error = nfs_create_rpc_client(clp, proto, timeo, retrans, authflavour); |
866 | if (error < 0) | 867 | if (error < 0) |
867 | goto error; | 868 | goto error; |
869 | memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr)); | ||
868 | 870 | ||
869 | error = nfs_idmap_new(clp); | 871 | error = nfs_idmap_new(clp); |
870 | if (error < 0) { | 872 | if (error < 0) { |
@@ -888,6 +890,7 @@ error: | |||
888 | */ | 890 | */ |
889 | static int nfs4_set_client(struct nfs_server *server, | 891 | static int nfs4_set_client(struct nfs_server *server, |
890 | const char *hostname, const struct sockaddr_in *addr, | 892 | const char *hostname, const struct sockaddr_in *addr, |
893 | const char *ip_addr, | ||
891 | rpc_authflavor_t authflavour, | 894 | rpc_authflavor_t authflavour, |
892 | int proto, int timeo, int retrans) | 895 | int proto, int timeo, int retrans) |
893 | { | 896 | { |
@@ -902,7 +905,7 @@ static int nfs4_set_client(struct nfs_server *server, | |||
902 | error = PTR_ERR(clp); | 905 | error = PTR_ERR(clp); |
903 | goto error; | 906 | goto error; |
904 | } | 907 | } |
905 | error = nfs4_init_client(clp, proto, timeo, retrans, authflavour); | 908 | error = nfs4_init_client(clp, proto, timeo, retrans, ip_addr, authflavour); |
906 | if (error < 0) | 909 | if (error < 0) |
907 | goto error_put; | 910 | goto error_put; |
908 | 911 | ||
@@ -971,7 +974,7 @@ struct nfs_server *nfs4_create_server(const struct nfs4_mount_data *data, | |||
971 | return ERR_PTR(-ENOMEM); | 974 | return ERR_PTR(-ENOMEM); |
972 | 975 | ||
973 | /* Get a client record */ | 976 | /* Get a client record */ |
974 | error = nfs4_set_client(server, hostname, addr, authflavour, | 977 | error = nfs4_set_client(server, hostname, addr, ip_addr, authflavour, |
975 | data->proto, data->timeo, data->retrans); | 978 | data->proto, data->timeo, data->retrans); |
976 | if (error < 0) | 979 | if (error < 0) |
977 | goto error; | 980 | goto error; |
@@ -1041,6 +1044,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, | |||
1041 | /* Get a client representation. | 1044 | /* Get a client representation. |
1042 | * Note: NFSv4 always uses TCP, */ | 1045 | * Note: NFSv4 always uses TCP, */ |
1043 | error = nfs4_set_client(server, data->hostname, data->addr, | 1046 | error = nfs4_set_client(server, data->hostname, data->addr, |
1047 | parent_client->cl_ipaddr, | ||
1044 | data->authflavor, | 1048 | data->authflavor, |
1045 | parent_server->client->cl_xprt->prot, | 1049 | parent_server->client->cl_xprt->prot, |
1046 | parent_client->retrans_timeo, | 1050 | parent_client->retrans_timeo, |