btrfs: push extent lock down in submit_one_async_extent
authorJosef Bacik <josef@toxicpanda.com>
Wed, 3 Apr 2024 20:28:45 +0000 (16:28 -0400)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 May 2024 19:31:10 +0000 (21:31 +0200)
commit8325f41a564acf39f1251c0423e97eb73c85a56f
tree6897037082436464364ca6b3125fd70d931e769e
parentd456c25dbb2385fa081e615793c797cbcd412724
btrfs: push extent lock down in submit_one_async_extent

We don't need to include the time we spend in the allocator under our
extent lock protection, move it after the allocator and make sure we
lock the extent in the error case to ensure we're not clearing these
bits without the extent lock held.

Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c