btrfs: use level argument in log tree walk callback process_one_buffer()

We already have the extent buffer's level in an argument, there's no need
to call btrfs_header_level(). So use the level argument and make the code
shorter.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Filipe Manana
2025-08-28 17:20:24 +01:00
committed by David Sterba
parent 266967c0e2
commit c2ef817b28

View File

@@ -386,8 +386,7 @@ static int process_one_buffer(struct extent_buffer *eb,
return ret;
}
if (btrfs_buffer_uptodate(eb, gen, false) &&
btrfs_header_level(eb) == 0) {
if (btrfs_buffer_uptodate(eb, gen, false) && level == 0) {
ret = btrfs_exclude_logged_extents(eb);
if (ret)
btrfs_abort_transaction(trans, ret);