Merge tag 'for-linus-4.12b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / fs / btrfs / disk-io.h
index 2e0ec29bfd69f04b4232b75754010594bd3d5f95..21f1ceb85b76737a67c1ffbc02cbd725b09fb510 100644 (file)
@@ -101,14 +101,14 @@ struct btrfs_root *btrfs_alloc_dummy_root(struct btrfs_fs_info *fs_info);
  */
 static inline struct btrfs_root *btrfs_grab_fs_root(struct btrfs_root *root)
 {
-       if (atomic_inc_not_zero(&root->refs))
+       if (refcount_inc_not_zero(&root->refs))
                return root;
        return NULL;
 }
 
 static inline void btrfs_put_fs_root(struct btrfs_root *root)
 {
-       if (atomic_dec_and_test(&root->refs))
+       if (refcount_dec_and_test(&root->refs))
                kfree(root);
 }