Merge tag 'for-4.15-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[sfrench/cifs-2.6.git] / fs / btrfs / extent-tree.c
index 784d41e95ed9534b1f120d3e4895e9d4b8da38e3..4497f937e8fb7ce608f8ef7cc8db1c7a51bcd2a3 100644 (file)
@@ -3992,16 +3992,9 @@ void btrfs_dec_nocow_writers(struct btrfs_fs_info *fs_info, u64 bytenr)
        btrfs_put_block_group(bg);
 }
 
-static int btrfs_wait_nocow_writers_atomic_t(atomic_t *a)
-{
-       schedule();
-       return 0;
-}
-
 void btrfs_wait_nocow_writers(struct btrfs_block_group_cache *bg)
 {
-       wait_on_atomic_t(&bg->nocow_writers,
-                        btrfs_wait_nocow_writers_atomic_t,
+       wait_on_atomic_t(&bg->nocow_writers, atomic_t_wait,
                         TASK_UNINTERRUPTIBLE);
 }
 
@@ -6530,12 +6523,6 @@ void btrfs_dec_block_group_reservations(struct btrfs_fs_info *fs_info,
        btrfs_put_block_group(bg);
 }
 
-static int btrfs_wait_bg_reservations_atomic_t(atomic_t *a)
-{
-       schedule();
-       return 0;
-}
-
 void btrfs_wait_block_group_reservations(struct btrfs_block_group_cache *bg)
 {
        struct btrfs_space_info *space_info = bg->space_info;
@@ -6558,8 +6545,7 @@ void btrfs_wait_block_group_reservations(struct btrfs_block_group_cache *bg)
        down_write(&space_info->groups_sem);
        up_write(&space_info->groups_sem);
 
-       wait_on_atomic_t(&bg->reservations,
-                        btrfs_wait_bg_reservations_atomic_t,
+       wait_on_atomic_t(&bg->reservations, atomic_t_wait,
                         TASK_UNINTERRUPTIBLE);
 }
 
@@ -11059,12 +11045,6 @@ int btrfs_start_write_no_snapshotting(struct btrfs_root *root)
        return 1;
 }
 
-static int wait_snapshotting_atomic_t(atomic_t *a)
-{
-       schedule();
-       return 0;
-}
-
 void btrfs_wait_for_snapshot_creation(struct btrfs_root *root)
 {
        while (true) {
@@ -11073,8 +11053,7 @@ void btrfs_wait_for_snapshot_creation(struct btrfs_root *root)
                ret = btrfs_start_write_no_snapshotting(root);
                if (ret)
                        break;
-               wait_on_atomic_t(&root->will_be_snapshotted,
-                                wait_snapshotting_atomic_t,
+               wait_on_atomic_t(&root->will_be_snapshotted, atomic_t_wait,
                                 TASK_UNINTERRUPTIBLE);
        }
 }