btrfs: reduce critical section at btrfs_wait_ordered_extents()
authorFilipe Manana <fdmanana@suse.com>
Mon, 3 Jun 2024 12:30:35 +0000 (13:30 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:23 +0000 (15:33 +0200)
commitac1f580c10f31063ce9dae840d3499d41e3854ce
tree408d8b03828934d278ff4b084b7fba01d0f89123
parent03103ecf5ec95743615113e5d2d8feb8d1a42859
btrfs: reduce critical section at btrfs_wait_ordered_extents()

At btrfs_wait_ordered_extents(), there's no point in updating the counters
after locking the root's ordered extent lock, as the counters are local.
So change this to update the counters before taking the lock.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.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/ordered-data.c