From 73a1a6c012a5b89a31696bc8b0377243a08c875a Mon Sep 17 00:00:00 2001 From: Hawkins Jiawei Date: Fri, 28 Oct 2022 16:45:30 +0800 Signed-off-by: Hawkins Jiawei --- fs/btrfs/block-group.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index deebc8ddbd93..cb74fcbf7aaf 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -3415,6 +3415,11 @@ void btrfs_free_reserved_bytes(struct btrfs_block_group *cache, space_info->bytes_reserved -= num_bytes; space_info->max_extent_size = 0; + trace_btrfs_space_reservation(cache->fs_info, "space_info", + space_info->flags, -num_bytes, 1); + btrfs_space_info_update_bytes_may_use(cache->fs_info, + space_info, num_bytes); + if (delalloc) cache->delalloc_bytes -= num_bytes; spin_unlock(&cache->lock); -- 2.25.1