]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: use memcmp_extent_buffer() at replay_one_extent()
authorFilipe Manana <fdmanana@suse.com>
Thu, 13 Mar 2025 16:31:17 +0000 (16:31 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Mar 2025 19:35:55 +0000 (20:35 +0100)
commit6f7d81d88bf099b00ebba61eb9834e8b78862849
tree411363db70a94b35122d5a9d47c5d20a191b9446
parente0d5e3b743f93953229bbbf36d9ca5b4893b515e
btrfs: use memcmp_extent_buffer() at replay_one_extent()

Instead of using memcmp(), which requires copying both file extent items
from each extent buffer into a local buffer, use memcmp_extent_buffer() so
that we only need to copy one of the file extent items and directly use
the extent buffer of the other file extent item for the comparison.

This reduces code size, saves one memory copy and reduces stack usage.

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