]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: use level argument in log tree walk callback replay_one_buffer()
authorFilipe Manana <fdmanana@suse.com>
Thu, 28 Aug 2025 16:46:18 +0000 (17:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 2 Nov 2025 13:18:04 +0000 (22:18 +0900)
commit2f4097e63e5b300d7ab984a20fd1ac24192a7df3
tree0c4127b6150f02ebd4f94e1241aa41b50ba4655d
parente3eec45b91f68c819ac350aac74dc5bd49ff7a7d
btrfs: use level argument in log tree walk callback replay_one_buffer()

[ Upstream commit 6cb7f0b8c9b0d6a35682335fea88bd26f089306f ]

We already have the extent buffer's level in an argument, there's no need
to first ensure the extent buffer's data is loaded (by calling
btrfs_read_extent_buffer()) and then call btrfs_header_level() to check
the level. So use the level argument and do the check before calling
btrfs_read_extent_buffer().

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