aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-12-10 14:58:51 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-30 02:05:55 -0500
commitd7422c472bbaa419876b91e8823c6219c4a144cb (patch)
tree930f354403bb67124c9b218e100cac707a9abc71 /fs/nfs
parentff052645c939b2fd8d467105adf98fa621cc244b (diff)
NFS: Change nfs_get_client() to take sockaddr *
Adjust arguments and callers of nfs_get_client() to pass a "struct sockaddr *" instead of "struct sockaddr_in *" to support non-IPv4 addresses. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/client.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 73bf4ecad030..e43072bdbb0c 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -97,7 +97,7 @@ struct rpc_program nfsacl_program = {
97 97
98struct nfs_client_initdata { 98struct nfs_client_initdata {
99 const char *hostname; 99 const char *hostname;
100 const struct sockaddr_in *addr; 100 const struct sockaddr *addr;
101 size_t addrlen; 101 size_t addrlen;
102 const struct nfs_rpc_ops *rpc_ops; 102 const struct nfs_rpc_ops *rpc_ops;
103}; 103};
@@ -308,9 +308,8 @@ static struct nfs_client *nfs_get_client(const struct nfs_client_initdata *cl_in
308 struct nfs_client *clp, *new = NULL; 308 struct nfs_client *clp, *new = NULL;
309 int error; 309 int error;
310 310
311 dprintk("--> nfs_get_client(%s,"NIPQUAD_FMT":%d,%u)\n", 311 dprintk("--> nfs_get_client(%s,v%u)\n",
312 cl_init->hostname ?: "", NIPQUAD(cl_init->addr->sin_addr), 312 cl_init->hostname ?: "", cl_init->rpc_ops->version);
313 cl_init->addr->sin_port, cl_init->rpc_ops->version);
314 313
315 /* see if the client already exists */ 314 /* see if the client already exists */
316 do { 315 do {
@@ -581,7 +580,7 @@ static int nfs_init_server(struct nfs_server *server,
581{ 580{
582 struct nfs_client_initdata cl_init = { 581 struct nfs_client_initdata cl_init = {
583 .hostname = data->nfs_server.hostname, 582 .hostname = data->nfs_server.hostname,
584 .addr = &data->nfs_server.address, 583 .addr = (const struct sockaddr *)&data->nfs_server.address,
585 .addrlen = sizeof(data->nfs_server.address), 584 .addrlen = sizeof(data->nfs_server.address),
586 .rpc_ops = &nfs_v2_clientops, 585 .rpc_ops = &nfs_v2_clientops,
587 }; 586 };
@@ -935,7 +934,7 @@ static int nfs4_set_client(struct nfs_server *server,
935{ 934{
936 struct nfs_client_initdata cl_init = { 935 struct nfs_client_initdata cl_init = {
937 .hostname = hostname, 936 .hostname = hostname,
938 .addr = addr, 937 .addr = (const struct sockaddr *)addr,
939 .addrlen = sizeof(*addr), 938 .addrlen = sizeof(*addr),
940 .rpc_ops = &nfs_v4_clientops, 939 .rpc_ops = &nfs_v4_clientops,
941 }; 940 };