]> www.infradead.org Git - nvme.git/commit
btrfs: reduce critical section at btrfs_wait_ordered_roots()
authorFilipe Manana <fdmanana@suse.com>
Mon, 3 Jun 2024 12:25:00 +0000 (13:25 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:22 +0000 (15:33 +0200)
commit03103ecf5ec95743615113e5d2d8feb8d1a42859
tree85395c593e99faf877be71bbb61991c64f4a9914
parent2917f74102cf23afe770c1293aabce005f956b4f
btrfs: reduce critical section at btrfs_wait_ordered_roots()

At btrfs_wait_ordered_roots(), there's no point in decrementing the
counter after locking fs_info->ordered_root_lock as the counter is local.
So change this to decrement the counter 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