aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2012-05-21 22:44:50 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-22 16:45:44 -0400
commit73ea666c2bb536f2862cefdb3e014ed62b262ba5 (patch)
treeb1992b20a6d907660606b2fc998d75b2f56b894a /fs
parent591555465ec513c42416392d392fd56866cb220c (diff)
NFS: Use proper naming conventions for the nfs_client.net field
Clean up: When naming fields and data types, follow established conventions to facilitate accurate grep/cscope searches. Introduced by commit e50a7a1a "NFS: make NFS client allocated per network namespace context," Tue Jan 10, 2012. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/blocklayout/blocklayoutdev.c2
-rw-r--r--fs/nfs/client.c22
-rw-r--r--fs/nfs/idmap.c4
-rw-r--r--fs/nfs/nfs4filelayoutdev.c2
4 files changed, 15 insertions, 15 deletions
diff --git a/fs/nfs/blocklayout/blocklayoutdev.c b/fs/nfs/blocklayout/blocklayoutdev.c
index a5c88a554d92..c96554245ccf 100644
--- a/fs/nfs/blocklayout/blocklayoutdev.c
+++ b/fs/nfs/blocklayout/blocklayoutdev.c
@@ -123,7 +123,7 @@ nfs4_blk_decode_device(struct nfs_server *server,
123 uint8_t *dataptr; 123 uint8_t *dataptr;
124 DECLARE_WAITQUEUE(wq, current); 124 DECLARE_WAITQUEUE(wq, current);
125 int offset, len, i, rc; 125 int offset, len, i, rc;
126 struct net *net = server->nfs_client->net; 126 struct net *net = server->nfs_client->cl_net;
127 struct nfs_net *nn = net_generic(net, nfs_net_id); 127 struct nfs_net *nn = net_generic(net, nfs_net_id);
128 struct bl_dev_msg *reply = &nn->bl_mount_reply; 128 struct bl_dev_msg *reply = &nn->bl_mount_reply;
129 129
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 39db1beb92f8..9b9df71df09a 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -65,7 +65,7 @@ static DECLARE_WAIT_QUEUE_HEAD(nfs_client_active_wq);
65static int nfs_get_cb_ident_idr(struct nfs_client *clp, int minorversion) 65static int nfs_get_cb_ident_idr(struct nfs_client *clp, int minorversion)
66{ 66{
67 int ret = 0; 67 int ret = 0;
68 struct nfs_net *nn = net_generic(clp->net, nfs_net_id); 68 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
69 69
70 if (clp->rpc_ops->version != 4 || minorversion != 0) 70 if (clp->rpc_ops->version != 4 || minorversion != 0)
71 return ret; 71 return ret;
@@ -174,7 +174,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_
174 clp->cl_rpcclient = ERR_PTR(-EINVAL); 174 clp->cl_rpcclient = ERR_PTR(-EINVAL);
175 175
176 clp->cl_proto = cl_init->proto; 176 clp->cl_proto = cl_init->proto;
177 clp->net = get_net(cl_init->net); 177 clp->cl_net = get_net(cl_init->net);
178 178
179#ifdef CONFIG_NFS_V4 179#ifdef CONFIG_NFS_V4
180 err = nfs_get_cb_ident_idr(clp, cl_init->minorversion); 180 err = nfs_get_cb_ident_idr(clp, cl_init->minorversion);
@@ -252,7 +252,7 @@ void nfs_cleanup_cb_ident_idr(struct net *net)
252/* nfs_client_lock held */ 252/* nfs_client_lock held */
253static void nfs_cb_idr_remove_locked(struct nfs_client *clp) 253static void nfs_cb_idr_remove_locked(struct nfs_client *clp)
254{ 254{
255 struct nfs_net *nn = net_generic(clp->net, nfs_net_id); 255 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
256 256
257 if (clp->cl_cb_ident) 257 if (clp->cl_cb_ident)
258 idr_remove(&nn->cb_ident_idr, clp->cl_cb_ident); 258 idr_remove(&nn->cb_ident_idr, clp->cl_cb_ident);
@@ -305,7 +305,7 @@ static void nfs_free_client(struct nfs_client *clp)
305 if (clp->cl_machine_cred != NULL) 305 if (clp->cl_machine_cred != NULL)
306 put_rpccred(clp->cl_machine_cred); 306 put_rpccred(clp->cl_machine_cred);
307 307
308 put_net(clp->net); 308 put_net(clp->cl_net);
309 kfree(clp->cl_hostname); 309 kfree(clp->cl_hostname);
310 kfree(clp); 310 kfree(clp);
311 311
@@ -323,7 +323,7 @@ void nfs_put_client(struct nfs_client *clp)
323 return; 323 return;
324 324
325 dprintk("--> nfs_put_client({%d})\n", atomic_read(&clp->cl_count)); 325 dprintk("--> nfs_put_client({%d})\n", atomic_read(&clp->cl_count));
326 nn = net_generic(clp->net, nfs_net_id); 326 nn = net_generic(clp->cl_net, nfs_net_id);
327 327
328 if (atomic_dec_and_lock(&clp->cl_count, &nn->nfs_client_lock)) { 328 if (atomic_dec_and_lock(&clp->cl_count, &nn->nfs_client_lock)) {
329 list_del(&clp->cl_share_link); 329 list_del(&clp->cl_share_link);
@@ -661,7 +661,7 @@ static int nfs_create_rpc_client(struct nfs_client *clp,
661{ 661{
662 struct rpc_clnt *clnt = NULL; 662 struct rpc_clnt *clnt = NULL;
663 struct rpc_create_args args = { 663 struct rpc_create_args args = {
664 .net = clp->net, 664 .net = clp->cl_net,
665 .protocol = clp->cl_proto, 665 .protocol = clp->cl_proto,
666 .address = (struct sockaddr *)&clp->cl_addr, 666 .address = (struct sockaddr *)&clp->cl_addr,
667 .addrsize = clp->cl_addrlen, 667 .addrsize = clp->cl_addrlen,
@@ -715,7 +715,7 @@ static int nfs_start_lockd(struct nfs_server *server)
715 .nfs_version = clp->rpc_ops->version, 715 .nfs_version = clp->rpc_ops->version,
716 .noresvport = server->flags & NFS_MOUNT_NORESVPORT ? 716 .noresvport = server->flags & NFS_MOUNT_NORESVPORT ?
717 1 : 0, 717 1 : 0,
718 .net = clp->net, 718 .net = clp->cl_net,
719 }; 719 };
720 720
721 if (nlm_init.nfs_version > 3) 721 if (nlm_init.nfs_version > 3)
@@ -1060,7 +1060,7 @@ static void nfs_server_copy_userdata(struct nfs_server *target, struct nfs_serve
1060static void nfs_server_insert_lists(struct nfs_server *server) 1060static void nfs_server_insert_lists(struct nfs_server *server)
1061{ 1061{
1062 struct nfs_client *clp = server->nfs_client; 1062 struct nfs_client *clp = server->nfs_client;
1063 struct nfs_net *nn = net_generic(clp->net, nfs_net_id); 1063 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
1064 1064
1065 spin_lock(&nn->nfs_client_lock); 1065 spin_lock(&nn->nfs_client_lock);
1066 list_add_tail_rcu(&server->client_link, &clp->cl_superblocks); 1066 list_add_tail_rcu(&server->client_link, &clp->cl_superblocks);
@@ -1077,7 +1077,7 @@ static void nfs_server_remove_lists(struct nfs_server *server)
1077 1077
1078 if (clp == NULL) 1078 if (clp == NULL)
1079 return; 1079 return;
1080 nn = net_generic(clp->net, nfs_net_id); 1080 nn = net_generic(clp->cl_net, nfs_net_id);
1081 spin_lock(&nn->nfs_client_lock); 1081 spin_lock(&nn->nfs_client_lock);
1082 list_del_rcu(&server->client_link); 1082 list_del_rcu(&server->client_link);
1083 if (list_empty(&clp->cl_superblocks)) 1083 if (list_empty(&clp->cl_superblocks))
@@ -1486,7 +1486,7 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_client* mds_clp,
1486 .rpc_ops = &nfs_v4_clientops, 1486 .rpc_ops = &nfs_v4_clientops,
1487 .proto = ds_proto, 1487 .proto = ds_proto,
1488 .minorversion = mds_clp->cl_minorversion, 1488 .minorversion = mds_clp->cl_minorversion,
1489 .net = mds_clp->net, 1489 .net = mds_clp->cl_net,
1490 }; 1490 };
1491 struct rpc_timeout ds_timeout; 1491 struct rpc_timeout ds_timeout;
1492 struct nfs_client *clp; 1492 struct nfs_client *clp;
@@ -1709,7 +1709,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
1709 rpc_protocol(parent_server->client), 1709 rpc_protocol(parent_server->client),
1710 parent_server->client->cl_timeout, 1710 parent_server->client->cl_timeout,
1711 parent_client->cl_mvops->minor_version, 1711 parent_client->cl_mvops->minor_version,
1712 parent_client->net); 1712 parent_client->cl_net);
1713 if (error < 0) 1713 if (error < 0)
1714 goto error; 1714 goto error;
1715 1715
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index 3e8edbe71ec6..2eaecf9d8db7 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -415,7 +415,7 @@ static int __nfs_idmap_register(struct dentry *dir,
415static void nfs_idmap_unregister(struct nfs_client *clp, 415static void nfs_idmap_unregister(struct nfs_client *clp,
416 struct rpc_pipe *pipe) 416 struct rpc_pipe *pipe)
417{ 417{
418 struct net *net = clp->net; 418 struct net *net = clp->cl_net;
419 struct super_block *pipefs_sb; 419 struct super_block *pipefs_sb;
420 420
421 pipefs_sb = rpc_get_sb_net(net); 421 pipefs_sb = rpc_get_sb_net(net);
@@ -429,7 +429,7 @@ static int nfs_idmap_register(struct nfs_client *clp,
429 struct idmap *idmap, 429 struct idmap *idmap,
430 struct rpc_pipe *pipe) 430 struct rpc_pipe *pipe)
431{ 431{
432 struct net *net = clp->net; 432 struct net *net = clp->cl_net;
433 struct super_block *pipefs_sb; 433 struct super_block *pipefs_sb;
434 int err = 0; 434 int err = 0;
435 435
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
index bf49b78db1b3..c610f84ff030 100644
--- a/fs/nfs/nfs4filelayoutdev.c
+++ b/fs/nfs/nfs4filelayoutdev.c
@@ -629,7 +629,7 @@ decode_device(struct inode *ino, struct pnfs_device *pdev, gfp_t gfp_flags)
629 629
630 mp_count = be32_to_cpup(p); /* multipath count */ 630 mp_count = be32_to_cpup(p); /* multipath count */
631 for (j = 0; j < mp_count; j++) { 631 for (j = 0; j < mp_count; j++) {
632 da = decode_ds_addr(NFS_SERVER(ino)->nfs_client->net, 632 da = decode_ds_addr(NFS_SERVER(ino)->nfs_client->cl_net,
633 &stream, gfp_flags); 633 &stream, gfp_flags);
634 if (da) 634 if (da)
635 list_add_tail(&da->da_node, &dsaddrs); 635 list_add_tail(&da->da_node, &dsaddrs);