Commit 7d9ac06f26fe8d477c813405f1a8c7c90eecef2d
Committed by
Linus Torvalds
1 parent
eda3cef8dd
[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>
Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff
fs/nfs/client.c
... | ... | @@ -849,6 +849,7 @@ |
849 | 849 | */ |
850 | 850 | static int nfs4_init_client(struct nfs_client *clp, |
851 | 851 | int proto, int timeo, int retrans, |
852 | + const char *ip_addr, | |
852 | 853 | rpc_authflavor_t authflavour) |
853 | 854 | { |
854 | 855 | int error; |
... | ... | @@ -865,6 +866,7 @@ |
865 | 866 | error = nfs_create_rpc_client(clp, proto, timeo, retrans, authflavour); |
866 | 867 | if (error < 0) |
867 | 868 | goto error; |
869 | + memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr)); | |
868 | 870 | |
869 | 871 | error = nfs_idmap_new(clp); |
870 | 872 | if (error < 0) { |
... | ... | @@ -888,6 +890,7 @@ |
888 | 890 | */ |
889 | 891 | static int nfs4_set_client(struct nfs_server *server, |
890 | 892 | const char *hostname, const struct sockaddr_in *addr, |
893 | + const char *ip_addr, | |
891 | 894 | rpc_authflavor_t authflavour, |
892 | 895 | int proto, int timeo, int retrans) |
893 | 896 | { |
... | ... | @@ -902,7 +905,7 @@ |
902 | 905 | error = PTR_ERR(clp); |
903 | 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 | 909 | if (error < 0) |
907 | 910 | goto error_put; |
908 | 911 | |
... | ... | @@ -971,7 +974,7 @@ |
971 | 974 | return ERR_PTR(-ENOMEM); |
972 | 975 | |
973 | 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 | 978 | data->proto, data->timeo, data->retrans); |
976 | 979 | if (error < 0) |
977 | 980 | goto error; |
... | ... | @@ -1041,6 +1044,7 @@ |
1041 | 1044 | /* Get a client representation. |
1042 | 1045 | * Note: NFSv4 always uses TCP, */ |
1043 | 1046 | error = nfs4_set_client(server, data->hostname, data->addr, |
1047 | + parent_client->cl_ipaddr, | |
1044 | 1048 | data->authflavor, |
1045 | 1049 | parent_server->client->cl_xprt->prot, |
1046 | 1050 | parent_client->retrans_timeo, |