diff options
| -rw-r--r-- | fs/btrfs/free-space-cache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 7f90c2bf9d5f..4ba0aedc878b 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
| @@ -2458,6 +2458,7 @@ void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group, | |||
| 2458 | struct rb_node *n; | 2458 | struct rb_node *n; |
| 2459 | int count = 0; | 2459 | int count = 0; |
| 2460 | 2460 | ||
| 2461 | spin_lock(&ctl->tree_lock); | ||
| 2461 | for (n = rb_first(&ctl->free_space_offset); n; n = rb_next(n)) { | 2462 | for (n = rb_first(&ctl->free_space_offset); n; n = rb_next(n)) { |
| 2462 | info = rb_entry(n, struct btrfs_free_space, offset_index); | 2463 | info = rb_entry(n, struct btrfs_free_space, offset_index); |
| 2463 | if (info->bytes >= bytes && !block_group->ro) | 2464 | if (info->bytes >= bytes && !block_group->ro) |
| @@ -2466,6 +2467,7 @@ void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group, | |||
| 2466 | info->offset, info->bytes, | 2467 | info->offset, info->bytes, |
| 2467 | (info->bitmap) ? "yes" : "no"); | 2468 | (info->bitmap) ? "yes" : "no"); |
| 2468 | } | 2469 | } |
| 2470 | spin_unlock(&ctl->tree_lock); | ||
| 2469 | btrfs_info(fs_info, "block group has cluster?: %s", | 2471 | btrfs_info(fs_info, "block group has cluster?: %s", |
| 2470 | list_empty(&block_group->cluster_list) ? "no" : "yes"); | 2472 | list_empty(&block_group->cluster_list) ? "no" : "yes"); |
| 2471 | btrfs_info(fs_info, | 2473 | btrfs_info(fs_info, |
