History

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.

Chuck Lever committed 14 years ago

Commit 73ea6661 parent 59155545 files · +16 −16Browse files

Unified · Split

5 files
  1. fs/nfs/blocklayout/blocklayoutdev.c +1 −1
  2. fs/nfs/client.c +11 −11
  3. fs/nfs/idmap.c +2 −2
  4. fs/nfs/nfs4filelayoutdev.c +1 −1
  5. include/linux/nfs_fs_sb.h +1 −1
fs/nfs/blocklayout/blocklayoutdev.c+1−1
@@ -123,7 +123,7 @@ nfs4_blk_decode_device(struct nfs_server *server, · 122 unmodified lines
123123 uint8_t *dataptr;
124124 DECLARE_WAITQUEUE(wq, current);
125125 int offset, len, i, rc;
126− struct net *net = server->nfs_client->net;
126+ struct net *net = server->nfs_client->cl_net;
127127 struct nfs_net *nn = net_generic(net, nfs_net_id);
128128 struct bl_dev_msg *reply = &nn->bl_mount_reply;
129129
fs/nfs/client.c+11−11
@@ -65,7 +65,7 @@ static DECLARE_WAIT_QUEUE_HEAD(nfs_client_active_wq); · 64 unmodified lines
6565 static int nfs_get_cb_ident_idr(struct nfs_client *clp, int minorversion)
6666 {
6767 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);
6969
7070 if (clp->rpc_ops->version != 4 || minorversion != 0)
7171 return ret;
@@ -174,7 +174,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_ · 102 unmodified lines
174174 clp->cl_rpcclient = ERR_PTR(-EINVAL);
175175
176176 clp->cl_proto = cl_init->proto;
177− clp->net = get_net(cl_init->net);
177+ clp->cl_net = get_net(cl_init->net);
178178
179179 #ifdef CONFIG_NFS_V4
180180 err = nfs_get_cb_ident_idr(clp, cl_init->minorversion);
@@ -252,7 +252,7 @@ void nfs_cleanup_cb_ident_idr(struct net *net) · 71 unmodified lines
252252 /* nfs_client_lock held */
253253 static void nfs_cb_idr_remove_locked(struct nfs_client *clp)
254254 {
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);
256256
257257 if (clp->cl_cb_ident)
258258 idr_remove(&nn->cb_ident_idr, clp->cl_cb_ident);
@@ -305,7 +305,7 @@ static void nfs_free_client(struct nfs_client *clp) · 46 unmodified lines
305305 if (clp->cl_machine_cred != NULL)
306306 put_rpccred(clp->cl_machine_cred);
307307
308− put_net(clp->net);
308+ put_net(clp->cl_net);
309309 kfree(clp->cl_hostname);
310310 kfree(clp);
311311
@@ -323,7 +323,7 @@ void nfs_put_client(struct nfs_client *clp) · 11 unmodified lines
323323 return;
324324
325325 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);
327327
328328 if (atomic_dec_and_lock(&clp->cl_count, &nn->nfs_client_lock)) {
329329 list_del(&clp->cl_share_link);
@@ -661,7 +661,7 @@ static int nfs_create_rpc_client(struct nfs_client *clp, · 331 unmodified lines
661661 {
662662 struct rpc_clnt *clnt = NULL;
663663 struct rpc_create_args args = {
664− .net = clp->net,
664+ .net = clp->cl_net,
665665 .protocol = clp->cl_proto,
666666 .address = (struct sockaddr *)&clp->cl_addr,
667667 .addrsize = clp->cl_addrlen,
@@ -715,7 +715,7 @@ static int nfs_start_lockd(struct nfs_server *server) · 47 unmodified lines
715715 .nfs_version = clp->rpc_ops->version,
716716 .noresvport = server->flags & NFS_MOUNT_NORESVPORT ?
717717 1 : 0,
718− .net = clp->net,
718+ .net = clp->cl_net,
719719 };
720720
721721 if (nlm_init.nfs_version > 3)
@@ -1060,7 +1060,7 @@ static void nfs_server_copy_userdata(struct nfs_server *target, struct nfs_serve · 338 unmodified lines
10601060 static void nfs_server_insert_lists(struct nfs_server *server)
10611061 {
10621062 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);
10641064
10651065 spin_lock(&nn->nfs_client_lock);
10661066 list_add_tail_rcu(&server->client_link, &clp->cl_superblocks);
@@ -1077,7 +1077,7 @@ static void nfs_server_remove_lists(struct nfs_server *server) · 10 unmodified lines
10771077
10781078 if (clp == NULL)
10791079 return;
1080− nn = net_generic(clp->net, nfs_net_id);
1080+ nn = net_generic(clp->cl_net, nfs_net_id);
10811081 spin_lock(&nn->nfs_client_lock);
10821082 list_del_rcu(&server->client_link);
10831083 if (list_empty(&clp->cl_superblocks))
@@ -1486,7 +1486,7 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_client* mds_clp, · 402 unmodified lines
14861486 .rpc_ops = &nfs_v4_clientops,
14871487 .proto = ds_proto,
14881488 .minorversion = mds_clp->cl_minorversion,
1489− .net = mds_clp->net,
1489+ .net = mds_clp->cl_net,
14901490 };
14911491 struct rpc_timeout ds_timeout;
14921492 struct nfs_client *clp;
@@ -1709,7 +1709,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, · 216 unmodified lines
17091709 rpc_protocol(parent_server->client),
17101710 parent_server->client->cl_timeout,
17111711 parent_client->cl_mvops->minor_version,
1712− parent_client->net);
1712+ parent_client->cl_net);
17131713 if (error < 0)
17141714 goto error;
17151715
fs/nfs/idmap.c+2−2
@@ -415,7 +415,7 @@ static int __nfs_idmap_register(struct dentry *dir, · 414 unmodified lines
415415 static void nfs_idmap_unregister(struct nfs_client *clp,
416416 struct rpc_pipe *pipe)
417417 {
418− struct net *net = clp->net;
418+ struct net *net = clp->cl_net;
419419 struct super_block *pipefs_sb;
420420
421421 pipefs_sb = rpc_get_sb_net(net);
@@ -429,7 +429,7 @@ static int nfs_idmap_register(struct nfs_client *clp, · 7 unmodified lines
429429 struct idmap *idmap,
430430 struct rpc_pipe *pipe)
431431 {
432− struct net *net = clp->net;
432+ struct net *net = clp->cl_net;
433433 struct super_block *pipefs_sb;
434434 int err = 0;
435435
fs/nfs/nfs4filelayoutdev.c+1−1
@@ -629,7 +629,7 @@ decode_device(struct inode *ino, struct pnfs_device *pdev, gfp_t gfp_flags) · 628 unmodified lines
629629
630630 mp_count = be32_to_cpup(p); /* multipath count */
631631 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,
633633 &stream, gfp_flags);
634634 if (da)
635635 list_add_tail(&da->da_node, &dsaddrs);
include/linux/nfs_fs_sb.h+1−1
@@ -88,7 +88,7 @@ struct nfs_client { · 87 unmodified lines
8888 struct fscache_cookie *fscache; /* client index cache cookie */
8989 #endif
9090
91− struct net *net;
91+ struct net *cl_net;
9292 };
9393
9494 /*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t