aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent-tree.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 5f6bc283c0c8..101041d4d2b2 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2676,6 +2676,8 @@ static int update_space_info(struct btrfs_fs_info *info, u64 flags,
2676 2676
2677 INIT_LIST_HEAD(&found->block_groups); 2677 INIT_LIST_HEAD(&found->block_groups);
2678 init_rwsem(&found->groups_sem); 2678 init_rwsem(&found->groups_sem);
2679 init_waitqueue_head(&found->flush_wait);
2680 init_waitqueue_head(&found->allocate_wait);
2679 spin_lock_init(&found->lock); 2681 spin_lock_init(&found->lock);
2680 found->flags = flags; 2682 found->flags = flags;
2681 found->total_bytes = total_bytes; 2683 found->total_bytes = total_bytes;
@@ -2944,12 +2946,10 @@ static void flush_delalloc(struct btrfs_root *root,
2944 2946
2945 spin_lock(&info->lock); 2947 spin_lock(&info->lock);
2946 2948
2947 if (!info->flushing) { 2949 if (!info->flushing)
2948 info->flushing = 1; 2950 info->flushing = 1;
2949 init_waitqueue_head(&info->flush_wait); 2951 else
2950 } else {
2951 wait = true; 2952 wait = true;
2952 }
2953 2953
2954 spin_unlock(&info->lock); 2954 spin_unlock(&info->lock);
2955 2955
@@ -3011,7 +3011,6 @@ static int maybe_allocate_chunk(struct btrfs_root *root,
3011 if (!info->allocating_chunk) { 3011 if (!info->allocating_chunk) {
3012 info->force_alloc = 1; 3012 info->force_alloc = 1;
3013 info->allocating_chunk = 1; 3013 info->allocating_chunk = 1;
3014 init_waitqueue_head(&info->allocate_wait);
3015 } else { 3014 } else {
3016 wait = true; 3015 wait = true;
3017 } 3016 }