aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/free-space-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r--fs/btrfs/free-space-cache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index cb2849f03251..f488fac04d99 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -18,6 +18,7 @@
18 18
19#include <linux/pagemap.h> 19#include <linux/pagemap.h>
20#include <linux/sched.h> 20#include <linux/sched.h>
21#include <linux/slab.h>
21#include <linux/math64.h> 22#include <linux/math64.h>
22#include "ctree.h" 23#include "ctree.h"
23#include "free-space-cache.h" 24#include "free-space-cache.h"
@@ -870,7 +871,7 @@ __btrfs_return_cluster_to_free_space(
870 tree_insert_offset(&block_group->free_space_offset, 871 tree_insert_offset(&block_group->free_space_offset,
871 entry->offset, &entry->offset_index, 0); 872 entry->offset, &entry->offset_index, 0);
872 } 873 }
873 cluster->root.rb_node = NULL; 874 cluster->root = RB_ROOT;
874 875
875out: 876out:
876 spin_unlock(&cluster->lock); 877 spin_unlock(&cluster->lock);
@@ -1355,7 +1356,7 @@ void btrfs_init_free_cluster(struct btrfs_free_cluster *cluster)
1355{ 1356{
1356 spin_lock_init(&cluster->lock); 1357 spin_lock_init(&cluster->lock);
1357 spin_lock_init(&cluster->refill_lock); 1358 spin_lock_init(&cluster->refill_lock);
1358 cluster->root.rb_node = NULL; 1359 cluster->root = RB_ROOT;
1359 cluster->max_size = 0; 1360 cluster->max_size = 0;
1360 cluster->points_to_bitmap = false; 1361 cluster->points_to_bitmap = false;
1361 INIT_LIST_HEAD(&cluster->block_group_list); 1362 INIT_LIST_HEAD(&cluster->block_group_list);