]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: pass walk_control structure to check_item_in_log()
authorFilipe Manana <fdmanana@suse.com>
Wed, 27 Aug 2025 15:27:57 +0000 (16:27 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 23 Sep 2025 06:49:18 +0000 (08:49 +0200)
commitb150f1c32138d6cdf1e6330521a5bbff3cdd9018
tree4005d2e6c97dd66ef3f5c2d1d1a528b0fd76a05b
parent82d1db6f465748d914cc95fb550ed786119f2925
btrfs: pass walk_control structure to check_item_in_log()

Instead of passing the transaction and log tree as arguments to
check_item_in_log(), pass the walk_control structure as we can grab those
from the structure. This reduces the number of arguments passed and it's
going to be needed by an incoming change that improves error reporting for
log replay. Notice that a NULL log root argument to check_item_in_log()
makes it unconditionally delete a directory entry, so since the
walk_control always has a non-NULL log root, we add an extra boolean to
check_item_in_log() to tell it if it should unconditionally delete a
directory entry, preserving the behaviour and also making it a bit more
clear.

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