btrfs: unfold transaction abort at __btrfs_inc_extent_ref()
authorFilipe Manana <fdmanana@suse.com>
Fri, 16 May 2025 16:26:03 +0000 (17:26 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 13:31:05 +0000 (15:31 +0200)
commit227aa55fa2bf4bb81f654c62cbcc6569854c1730
tree5b3fb998e48fe95bce68d1fa3f7638ff78abb0b8
parent3f757b56f1c4579fe32b810bce1d39f202964412
btrfs: unfold transaction abort at __btrfs_inc_extent_ref()

Instead of having a common btrfs_abort_transaction() call for when either
insert_tree_block_ref() failed or when insert_extent_data_ref() failed,
move the btrfs_abort_transaction() to happen immediately after each one of
those calls, so that when analysing a stack trace with a transaction abort
we know which call failed.

Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c