Commit 73ea666c authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

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: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 59155546
...@@ -123,7 +123,7 @@ nfs4_blk_decode_device(struct nfs_server *server, ...@@ -123,7 +123,7 @@ nfs4_blk_decode_device(struct nfs_server *server,
uint8_t *dataptr; uint8_t *dataptr;
DECLARE_WAITQUEUE(wq, current); DECLARE_WAITQUEUE(wq, current);
int offset, len, i, rc; int offset, len, i, rc;
struct net *net = server->nfs_client->net; struct net *net = server->nfs_client->cl_net;
struct nfs_net *nn = net_generic(net, nfs_net_id); struct nfs_net *nn = net_generic(net, nfs_net_id);
struct bl_dev_msg *reply = &nn->bl_mount_reply; struct bl_dev_msg *reply = &nn->bl_mount_reply;
......
...@@ -65,7 +65,7 @@ static DECLARE_WAIT_QUEUE_HEAD(nfs_client_active_wq); ...@@ -65,7 +65,7 @@ static DECLARE_WAIT_QUEUE_HEAD(nfs_client_active_wq);
static int nfs_get_cb_ident_idr(struct nfs_client *clp, int minorversion) static int nfs_get_cb_ident_idr(struct nfs_client *clp, int minorversion)
{ {
int ret = 0; int ret = 0;
struct nfs_net *nn = net_generic(clp->net, nfs_net_id); struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
if (clp->rpc_ops->version != 4 || minorversion != 0) if (clp->rpc_ops->version != 4 || minorversion != 0)
return ret; return ret;
...@@ -174,7 +174,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_ ...@@ -174,7 +174,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_
clp->cl_rpcclient = ERR_PTR(-EINVAL); clp->cl_rpcclient = ERR_PTR(-EINVAL);
clp->cl_proto = cl_init->proto; clp->cl_proto = cl_init->proto;
clp->net = get_net(cl_init->net); clp->cl_net = get_net(cl_init->net);
#ifdef CONFIG_NFS_V4 #ifdef CONFIG_NFS_V4
err = nfs_get_cb_ident_idr(clp, cl_init->minorversion); err = nfs_get_cb_ident_idr(clp, cl_init->minorversion);
...@@ -252,7 +252,7 @@ void nfs_cleanup_cb_ident_idr(struct net *net) ...@@ -252,7 +252,7 @@ void nfs_cleanup_cb_ident_idr(struct net *net)
/* nfs_client_lock held */ /* nfs_client_lock held */
static void nfs_cb_idr_remove_locked(struct nfs_client *clp) static void nfs_cb_idr_remove_locked(struct nfs_client *clp)
{ {
struct nfs_net *nn = net_generic(clp->net, nfs_net_id); struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
if (clp->cl_cb_ident) if (clp->cl_cb_ident)
idr_remove(&nn->cb_ident_idr, clp->cl_cb_ident); idr_remove(&nn->cb_ident_idr, clp->cl_cb_ident);
...@@ -305,7 +305,7 @@ static void nfs_free_client(struct nfs_client *clp) ...@@ -305,7 +305,7 @@ static void nfs_free_client(struct nfs_client *clp)
if (clp->cl_machine_cred != NULL) if (clp->cl_machine_cred != NULL)
put_rpccred(clp->cl_machine_cred); put_rpccred(clp->cl_machine_cred);
put_net(clp->net); put_net(clp->cl_net);
kfree(clp->cl_hostname); kfree(clp->cl_hostname);
kfree(clp); kfree(clp);
...@@ -323,7 +323,7 @@ void nfs_put_client(struct nfs_client *clp) ...@@ -323,7 +323,7 @@ void nfs_put_client(struct nfs_client *clp)
return; return;
dprintk("--> nfs_put_client({%d})\n", atomic_read(&clp->cl_count)); dprintk("--> nfs_put_client({%d})\n", atomic_read(&clp->cl_count));
nn = net_generic(clp->net, nfs_net_id); nn = net_generic(clp->cl_net, nfs_net_id);
if (atomic_dec_and_lock(&clp->cl_count, &nn->nfs_client_lock)) { if (atomic_dec_and_lock(&clp->cl_count, &nn->nfs_client_lock)) {
list_del(&clp->cl_share_link); list_del(&clp->cl_share_link);
...@@ -661,7 +661,7 @@ static int nfs_create_rpc_client(struct nfs_client *clp, ...@@ -661,7 +661,7 @@ static int nfs_create_rpc_client(struct nfs_client *clp,
{ {
struct rpc_clnt *clnt = NULL; struct rpc_clnt *clnt = NULL;
struct rpc_create_args args = { struct rpc_create_args args = {
.net = clp->net, .net = clp->cl_net,
.protocol = clp->cl_proto, .protocol = clp->cl_proto,
.address = (struct sockaddr *)&clp->cl_addr, .address = (struct sockaddr *)&clp->cl_addr,
.addrsize = clp->cl_addrlen, .addrsize = clp->cl_addrlen,
...@@ -715,7 +715,7 @@ static int nfs_start_lockd(struct nfs_server *server) ...@@ -715,7 +715,7 @@ static int nfs_start_lockd(struct nfs_server *server)
.nfs_version = clp->rpc_ops->version, .nfs_version = clp->rpc_ops->version,
.noresvport = server->flags & NFS_MOUNT_NORESVPORT ? .noresvport = server->flags & NFS_MOUNT_NORESVPORT ?
1 : 0, 1 : 0,
.net = clp->net, .net = clp->cl_net,
}; };
if (nlm_init.nfs_version > 3) if (nlm_init.nfs_version > 3)
...@@ -1060,7 +1060,7 @@ static void nfs_server_copy_userdata(struct nfs_server *target, struct nfs_serve ...@@ -1060,7 +1060,7 @@ static void nfs_server_copy_userdata(struct nfs_server *target, struct nfs_serve
static void nfs_server_insert_lists(struct nfs_server *server) static void nfs_server_insert_lists(struct nfs_server *server)
{ {
struct nfs_client *clp = server->nfs_client; struct nfs_client *clp = server->nfs_client;
struct nfs_net *nn = net_generic(clp->net, nfs_net_id); struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
spin_lock(&nn->nfs_client_lock); spin_lock(&nn->nfs_client_lock);
list_add_tail_rcu(&server->client_link, &clp->cl_superblocks); 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,7 +1077,7 @@ static void nfs_server_remove_lists(struct nfs_server *server)
if (clp == NULL) if (clp == NULL)
return; return;
nn = net_generic(clp->net, nfs_net_id); nn = net_generic(clp->cl_net, nfs_net_id);
spin_lock(&nn->nfs_client_lock); spin_lock(&nn->nfs_client_lock);
list_del_rcu(&server->client_link); list_del_rcu(&server->client_link);
if (list_empty(&clp->cl_superblocks)) if (list_empty(&clp->cl_superblocks))
...@@ -1486,7 +1486,7 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_client* mds_clp, ...@@ -1486,7 +1486,7 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_client* mds_clp,
.rpc_ops = &nfs_v4_clientops, .rpc_ops = &nfs_v4_clientops,
.proto = ds_proto, .proto = ds_proto,
.minorversion = mds_clp->cl_minorversion, .minorversion = mds_clp->cl_minorversion,
.net = mds_clp->net, .net = mds_clp->cl_net,
}; };
struct rpc_timeout ds_timeout; struct rpc_timeout ds_timeout;
struct nfs_client *clp; struct nfs_client *clp;
...@@ -1709,7 +1709,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, ...@@ -1709,7 +1709,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
rpc_protocol(parent_server->client), rpc_protocol(parent_server->client),
parent_server->client->cl_timeout, parent_server->client->cl_timeout,
parent_client->cl_mvops->minor_version, parent_client->cl_mvops->minor_version,
parent_client->net); parent_client->cl_net);
if (error < 0) if (error < 0)
goto error; goto error;
......
...@@ -415,7 +415,7 @@ static int __nfs_idmap_register(struct dentry *dir, ...@@ -415,7 +415,7 @@ static int __nfs_idmap_register(struct dentry *dir,
static void nfs_idmap_unregister(struct nfs_client *clp, static void nfs_idmap_unregister(struct nfs_client *clp,
struct rpc_pipe *pipe) struct rpc_pipe *pipe)
{ {
struct net *net = clp->net; struct net *net = clp->cl_net;
struct super_block *pipefs_sb; struct super_block *pipefs_sb;
pipefs_sb = rpc_get_sb_net(net); pipefs_sb = rpc_get_sb_net(net);
...@@ -429,7 +429,7 @@ static int nfs_idmap_register(struct nfs_client *clp, ...@@ -429,7 +429,7 @@ static int nfs_idmap_register(struct nfs_client *clp,
struct idmap *idmap, struct idmap *idmap,
struct rpc_pipe *pipe) struct rpc_pipe *pipe)
{ {
struct net *net = clp->net; struct net *net = clp->cl_net;
struct super_block *pipefs_sb; struct super_block *pipefs_sb;
int err = 0; int err = 0;
......
...@@ -629,7 +629,7 @@ decode_device(struct inode *ino, struct pnfs_device *pdev, gfp_t gfp_flags) ...@@ -629,7 +629,7 @@ decode_device(struct inode *ino, struct pnfs_device *pdev, gfp_t gfp_flags)
mp_count = be32_to_cpup(p); /* multipath count */ mp_count = be32_to_cpup(p); /* multipath count */
for (j = 0; j < mp_count; j++) { for (j = 0; j < mp_count; j++) {
da = decode_ds_addr(NFS_SERVER(ino)->nfs_client->net, da = decode_ds_addr(NFS_SERVER(ino)->nfs_client->cl_net,
&stream, gfp_flags); &stream, gfp_flags);
if (da) if (da)
list_add_tail(&da->da_node, &dsaddrs); list_add_tail(&da->da_node, &dsaddrs);
......
...@@ -88,7 +88,7 @@ struct nfs_client { ...@@ -88,7 +88,7 @@ struct nfs_client {
struct fscache_cookie *fscache; /* client index cache cookie */ struct fscache_cookie *fscache; /* client index cache cookie */
#endif #endif
struct net *net; struct net *cl_net;
}; };
/* /*
......
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