[06/23] btrfs: call btrfs_try_granting_tickets when freeing reserved bytes
diff mbox series

Message ID 20200204161951.764935-7-josef@toxicpanda.com
State New
Headers show
  • Convert data reservations to the ticketing infrastructure
Related show

Commit Message

Josef Bacik Feb. 4, 2020, 4:19 p.m. UTC
We were missing a call to btrfs_try_granting_tickets in
btrfs_free_reserved_bytes, so add it to handle the case where we're able
to satisfy an allocation because we've freed a pending reservation.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Tested-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
 fs/btrfs/block-group.c | 2 ++
 1 file changed, 2 insertions(+)


Johannes Thumshirn Feb. 4, 2020, 4:36 p.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

diff mbox series

diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 77ec0597bd17..616d0dd69394 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -2932,6 +2932,8 @@  void btrfs_free_reserved_bytes(struct btrfs_block_group *cache,
 	if (delalloc)
 		cache->delalloc_bytes -= num_bytes;
+	btrfs_try_granting_tickets(cache->fs_info, space_info);