summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/lockd/clntproc.c6
-rw-r--r--include/linux/lockd/lockd.h2
2 files changed, 4 insertions, 4 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);
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index cded0ad9ca05..86d012a76862 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -123,7 +123,7 @@ static inline struct sockaddr *nlm_srcaddr(const struct nlm_host *host)
123 */ 123 */
124struct nlm_lockowner { 124struct nlm_lockowner {
125 struct list_head list; 125 struct list_head list;
126 atomic_t count; 126 refcount_t count;
127 127
128 struct nlm_host *host; 128 struct nlm_host *host;
129 fl_owner_t owner; 129 fl_owner_t owner;