diff options
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r-- | fs/nfs/client.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 22880ef6d8dd..0ac2fb1c6b63 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -163,7 +163,7 @@ struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_init) | |||
163 | 163 | ||
164 | clp->rpc_ops = clp->cl_nfs_mod->rpc_ops; | 164 | clp->rpc_ops = clp->cl_nfs_mod->rpc_ops; |
165 | 165 | ||
166 | atomic_set(&clp->cl_count, 1); | 166 | refcount_set(&clp->cl_count, 1); |
167 | clp->cl_cons_state = NFS_CS_INITING; | 167 | clp->cl_cons_state = NFS_CS_INITING; |
168 | 168 | ||
169 | memcpy(&clp->cl_addr, cl_init->addr, cl_init->addrlen); | 169 | memcpy(&clp->cl_addr, cl_init->addr, cl_init->addrlen); |
@@ -269,7 +269,7 @@ void nfs_put_client(struct nfs_client *clp) | |||
269 | 269 | ||
270 | nn = net_generic(clp->cl_net, nfs_net_id); | 270 | nn = net_generic(clp->cl_net, nfs_net_id); |
271 | 271 | ||
272 | if (atomic_dec_and_lock(&clp->cl_count, &nn->nfs_client_lock)) { | 272 | if (refcount_dec_and_lock(&clp->cl_count, &nn->nfs_client_lock)) { |
273 | list_del(&clp->cl_share_link); | 273 | list_del(&clp->cl_share_link); |
274 | nfs_cb_idr_remove_locked(clp); | 274 | nfs_cb_idr_remove_locked(clp); |
275 | spin_unlock(&nn->nfs_client_lock); | 275 | spin_unlock(&nn->nfs_client_lock); |
@@ -314,7 +314,7 @@ static struct nfs_client *nfs_match_client(const struct nfs_client_initdata *dat | |||
314 | sap)) | 314 | sap)) |
315 | continue; | 315 | continue; |
316 | 316 | ||
317 | atomic_inc(&clp->cl_count); | 317 | refcount_inc(&clp->cl_count); |
318 | return clp; | 318 | return clp; |
319 | } | 319 | } |
320 | return NULL; | 320 | return NULL; |
@@ -1006,7 +1006,7 @@ struct nfs_server *nfs_clone_server(struct nfs_server *source, | |||
1006 | /* Copy data from the source */ | 1006 | /* Copy data from the source */ |
1007 | server->nfs_client = source->nfs_client; | 1007 | server->nfs_client = source->nfs_client; |
1008 | server->destroy = source->destroy; | 1008 | server->destroy = source->destroy; |
1009 | atomic_inc(&server->nfs_client->cl_count); | 1009 | refcount_inc(&server->nfs_client->cl_count); |
1010 | nfs_server_copy_userdata(server, source); | 1010 | nfs_server_copy_userdata(server, source); |
1011 | 1011 | ||
1012 | server->fsid = fattr->fsid; | 1012 | server->fsid = fattr->fsid; |
@@ -1166,7 +1166,7 @@ static int nfs_server_list_show(struct seq_file *m, void *v) | |||
1166 | clp->rpc_ops->version, | 1166 | clp->rpc_ops->version, |
1167 | rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_HEX_ADDR), | 1167 | rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_HEX_ADDR), |
1168 | rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_HEX_PORT), | 1168 | rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_HEX_PORT), |
1169 | atomic_read(&clp->cl_count), | 1169 | refcount_read(&clp->cl_count), |
1170 | clp->cl_hostname); | 1170 | clp->cl_hostname); |
1171 | rcu_read_unlock(); | 1171 | rcu_read_unlock(); |
1172 | 1172 | ||