summaryrefslogtreecommitdiffstats
path: root/fs/lockd/clntproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd/clntproc.c')
-rw-r--r--fs/lockd/clntproc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 066ac313ae5c..112173dbea76 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -48,13 +48,13 @@ void nlmclnt_next_cookie(struct nlm_cookie *c)
48 48
49static struct nlm_lockowner *nlm_get_lockowner(struct nlm_lockowner *lockowner) 49static struct nlm_lockowner *nlm_get_lockowner(struct nlm_lockowner *lockowner)
50{ 50{
51 atomic_inc(&lockowner->count); 51 refcount_inc(&lockowner->count);
52 return lockowner; 52 return lockowner;
53} 53}
54 54
55static void nlm_put_lockowner(struct nlm_lockowner *lockowner) 55static void nlm_put_lockowner(struct nlm_lockowner *lockowner)
56{ 56{
57 if (!atomic_dec_and_lock(&lockowner->count, &lockowner->host->h_lock)) 57 if (!refcount_dec_and_lock(&lockowner->count, &lockowner->host->h_lock))
58 return; 58 return;
59 list_del(&lockowner->list); 59 list_del(&lockowner->list);
60 spin_unlock(&lockowner->host->h_lock); 60 spin_unlock(&lockowner->host->h_lock);
@@ -105,7 +105,7 @@ static struct nlm_lockowner *nlm_find_lockowner(struct nlm_host *host, fl_owner_
105 res = __nlm_find_lockowner(host, owner); 105 res = __nlm_find_lockowner(host, owner);
106 if (res == NULL && new != NULL) { 106 if (res == NULL && new != NULL) {
107 res = new; 107 res = new;
108 atomic_set(&new->count, 1); 108 refcount_set(&new->count, 1);
109 new->owner = owner; 109 new->owner = owner;
110 new->pid = __nlm_alloc_pid(host); 110 new->pid = __nlm_alloc_pid(host);
111 new->host = nlm_get_host(host); 111 new->host = nlm_get_host(host);