btrfs-progs: use btrfs_csum_data() in __csum_tree_block_size()

Use the btrfs_csum_data() wrapper in __csum_tree_block_size() instead of
directly calling crc32c().

This helps us when plumbing new checksum algorithms into the FS.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
master
Johannes Thumshirn 2019-07-25 11:33:54 +02:00 committed by David Sterba
parent 55a8c9626f
commit 5eb0c11333
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ static int __csum_tree_block_size(struct extent_buffer *buf, u16 csum_size,
u32 crc = ~(u32)0;
len = buf->len - BTRFS_CSUM_SIZE;
crc = crc32c(crc, buf->data + BTRFS_CSUM_SIZE, len);
crc = btrfs_csum_data(buf->data + BTRFS_CSUM_SIZE, crc, len);
btrfs_csum_final(crc, result);
if (verify) {