]> Gentwo Git Trees - linux/.git/commit
btrfs: reduce block group critical section in pin_down_extent()
authorFilipe Manana <fdmanana@suse.com>
Mon, 20 Oct 2025 12:37:32 +0000 (13:37 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Nov 2025 21:15:13 +0000 (22:15 +0100)
commit585416766d2711d0bcc328f54bff392f5e865ffa
treec18957ee6955812532fd55d8a7b7e4f05e910b8c
parentc0d0b13d27f8cf9d5bf5adae52df8ec781fbb983
btrfs: reduce block group critical section in pin_down_extent()

There's no need to update the bytes_reserved and bytes_may_use fields of
the space_info while holding the block group's spinlock. We are only
making the critical section longer than necessary. So move the space_info
updates outside of the block group's critical section.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c