Merge tag 'nfs-for-4.15-3' of git://git.linux-nfs.org/projects/anna/linux-nfs
[linux-2.6-microblaze.git] / fs / notify / group.c
index 3235753..b7a4b6a 100644 (file)
@@ -107,7 +107,7 @@ void fsnotify_destroy_group(struct fsnotify_group *group)
  */
 void fsnotify_get_group(struct fsnotify_group *group)
 {
-       atomic_inc(&group->refcnt);
+       refcount_inc(&group->refcnt);
 }
 
 /*
@@ -115,7 +115,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
  */
 void fsnotify_put_group(struct fsnotify_group *group)
 {
-       if (atomic_dec_and_test(&group->refcnt))
+       if (refcount_dec_and_test(&group->refcnt))
                fsnotify_final_destroy_group(group);
 }
 
@@ -131,7 +131,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
                return ERR_PTR(-ENOMEM);
 
        /* set to 0 when there a no external references to this group */
-       atomic_set(&group->refcnt, 1);
+       refcount_set(&group->refcnt, 1);
        atomic_set(&group->num_marks, 0);
        atomic_set(&group->user_waits, 0);