btrfs-progs: don't use btrfs_header_csum helper

This is a useless helper, the csum is always the first thing in the
header, simply read from offset 0.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Josef Bacik 2022-11-23 17:37:32 -05:00 committed by David Sterba
parent 405b5cadd3
commit 5324ca5ae0
1 changed files with 1 additions and 2 deletions

View File

@ -93,8 +93,7 @@ static struct extent_record *btrfs_new_extent_record(struct extent_buffer *eb)
rec->cache.start = btrfs_header_bytenr(eb);
rec->cache.size = eb->len;
rec->generation = btrfs_header_generation(eb);
read_extent_buffer(eb, rec->csum, (unsigned long)btrfs_header_csum(eb),
BTRFS_CSUM_SIZE);
read_extent_buffer(eb, rec->csum, 0, BTRFS_CSUM_SIZE);
return rec;
}