]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: abort transaction in the process_one_buffer() log tree walk callback
authorFilipe Manana <fdmanana@suse.com>
Wed, 16 Jul 2025 14:49:31 +0000 (15:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 2 Nov 2025 13:18:04 +0000 (22:18 +0900)
commite587f12fff7797345054c5199fc8598c74e313ca
tree3a3097738f0881c7a1f79bd679f941ce16bf32a1
parentb64764e38bcdb2053121d9e55b9b4678dfc475f2
btrfs: abort transaction in the process_one_buffer() log tree walk callback

[ Upstream commit e6dd405b6671b9753b98d8bdf76f8f0ed36c11cd ]

In the process_one_buffer() log tree walk callback we return errors to the
log tree walk caller and then the caller aborts the transaction, if we
have one, or turns the fs into error state if we don't have one. While
this reduces code it makes it harder to figure out where exactly an error
came from. So add the transaction aborts after every failure inside the
process_one_buffer() callback, so that it helps figuring out why failures
happen.

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.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/tree-log.c