]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: abort transaction if we fail to find dir item during log replay
authorFilipe Manana <fdmanana@suse.com>
Wed, 3 Sep 2025 16:39:24 +0000 (17:39 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 23 Sep 2025 06:49:21 +0000 (08:49 +0200)
commit0b7453b7a1c1f8aa1570da2d0cc81bf7691eb5f1
tree8c702ef5496215a1b4571b4e1b3712fb7edc8c98
parente41c5e611a65799747709b8fed461dd07647c40d
btrfs: abort transaction if we fail to find dir item during log replay

At __add_inode_ref() if we get an error when trying to lookup a dir item
we don't abort the transaction and propagate the error up the call chain,
so that somewhere else up in the call chain the transaction is aborted.
This however makes it hard to know that the failure comes from looking up
a dir item, so add a transaction abort in case we fail there, so that we
immediately pinpoint where the problem comes from during log replay.

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/tree-log.c