]> www.infradead.org Git - users/dwmw2/linux.git/commit
btrfs: remove unnecessary delayed refs locking at btrfs_qgroup_trace_extent()
authorFilipe Manana <fdmanana@suse.com>
Tue, 24 Sep 2024 16:37:28 +0000 (17:37 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 11 Nov 2024 13:34:13 +0000 (14:34 +0100)
commitc5e268022465c6a6fa8dac88e6b6fd17e2386b35
tree738babc46bbe1bf71ec1d36314fa67f9c06f9d6f
parentfad884b0c821d60046d03791e7032112142fd37e
btrfs: remove unnecessary delayed refs locking at btrfs_qgroup_trace_extent()

There's no need to hold the delayed refs spinlock when calling
btrfs_qgroup_trace_extent_nolock() from btrfs_qgroup_trace_extent(), since
it doesn't change anything in delayed refs and it only changes the xarray
used to track qgroup extent records, which is protected by the xarray's
lock.

Holding the lock is only adding unnecessary lock contention with other
tasks that actually need to take the lock to add/remove/change delayed
references. So remove the locking.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/qgroup.c