diff options
author | Vinod Koul <vkoul@kernel.org> | 2020-09-11 15:15:36 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-09-11 15:15:36 +0300 |
commit | 4c80e9323967125ab8aa7c271ccc7624abc08832 (patch) | |
tree | c9881b5814c184aa0c1cb58c6383beab9173e388 /fs/btrfs/block-group.c | |
parent | ef759e4a28c88965972c815af6023f41bd733316 (diff) | |
parent | f4d51dffc6c01a9e94650d95ce0104964f8ae822 (diff) | |
download | linux-4c80e9323967125ab8aa7c271ccc7624abc08832.tar.xz |
Merge tag 'v5.9-rc4' into next
Linux 5.9-rc4
Diffstat (limited to 'fs/btrfs/block-group.c')
-rw-r--r-- | fs/btrfs/block-group.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index 613920c17ac1..ea8aaf36647e 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -1798,7 +1798,6 @@ static struct btrfs_block_group *btrfs_create_block_group_cache( cache->fs_info = fs_info; cache->full_stripe_len = btrfs_full_stripe_len(fs_info, start); - set_free_space_tree_thresholds(cache); cache->discard_index = BTRFS_DISCARD_INDEX_UNUSED; @@ -1912,6 +1911,8 @@ static int read_one_block_group(struct btrfs_fs_info *info, if (ret < 0) goto error; + set_free_space_tree_thresholds(cache); + if (need_clear) { /* * When we mount with old space cache, we need to @@ -2132,6 +2133,7 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans, u64 bytes_used, return -ENOMEM; cache->length = size; + set_free_space_tree_thresholds(cache); cache->used = bytes_used; cache->flags = type; cache->last_byte_to_unpin = (u64)-1; |