Commit 7d9ac06f authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Linus Torvalds

[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: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent eda3cef8
...@@ -849,6 +849,7 @@ struct nfs_server *nfs_create_server(const struct nfs_mount_data *data, ...@@ -849,6 +849,7 @@ struct nfs_server *nfs_create_server(const struct nfs_mount_data *data,
*/ */
static int nfs4_init_client(struct nfs_client *clp, static int nfs4_init_client(struct nfs_client *clp,
int proto, int timeo, int retrans, int proto, int timeo, int retrans,
const char *ip_addr,
rpc_authflavor_t authflavour) rpc_authflavor_t authflavour)
{ {
int error; int error;
...@@ -865,6 +866,7 @@ static int nfs4_init_client(struct nfs_client *clp, ...@@ -865,6 +866,7 @@ static int nfs4_init_client(struct nfs_client *clp,
error = nfs_create_rpc_client(clp, proto, timeo, retrans, authflavour); error = nfs_create_rpc_client(clp, proto, timeo, retrans, authflavour);
if (error < 0) if (error < 0)
goto error; goto error;
memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr));
error = nfs_idmap_new(clp); error = nfs_idmap_new(clp);
if (error < 0) { if (error < 0) {
...@@ -888,6 +890,7 @@ static int nfs4_init_client(struct nfs_client *clp, ...@@ -888,6 +890,7 @@ static int nfs4_init_client(struct nfs_client *clp,
*/ */
static int nfs4_set_client(struct nfs_server *server, static int nfs4_set_client(struct nfs_server *server,
const char *hostname, const struct sockaddr_in *addr, const char *hostname, const struct sockaddr_in *addr,
const char *ip_addr,
rpc_authflavor_t authflavour, rpc_authflavor_t authflavour,
int proto, int timeo, int retrans) int proto, int timeo, int retrans)
{ {
...@@ -902,7 +905,7 @@ static int nfs4_set_client(struct nfs_server *server, ...@@ -902,7 +905,7 @@ static int nfs4_set_client(struct nfs_server *server,
error = PTR_ERR(clp); error = PTR_ERR(clp);
goto error; goto error;
} }
error = nfs4_init_client(clp, proto, timeo, retrans, authflavour); error = nfs4_init_client(clp, proto, timeo, retrans, ip_addr, authflavour);
if (error < 0) if (error < 0)
goto error_put; goto error_put;
...@@ -971,7 +974,7 @@ struct nfs_server *nfs4_create_server(const struct nfs4_mount_data *data, ...@@ -971,7 +974,7 @@ struct nfs_server *nfs4_create_server(const struct nfs4_mount_data *data,
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
/* Get a client record */ /* Get a client record */
error = nfs4_set_client(server, hostname, addr, authflavour, error = nfs4_set_client(server, hostname, addr, ip_addr, authflavour,
data->proto, data->timeo, data->retrans); data->proto, data->timeo, data->retrans);
if (error < 0) if (error < 0)
goto error; goto error;
...@@ -1041,6 +1044,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, ...@@ -1041,6 +1044,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
/* Get a client representation. /* Get a client representation.
* Note: NFSv4 always uses TCP, */ * Note: NFSv4 always uses TCP, */
error = nfs4_set_client(server, data->hostname, data->addr, error = nfs4_set_client(server, data->hostname, data->addr,
parent_client->cl_ipaddr,
data->authflavor, data->authflavor,
parent_server->client->cl_xprt->prot, parent_server->client->cl_xprt->prot,
parent_client->retrans_timeo, parent_client->retrans_timeo,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment