btrfs: use btrfs_csum_data() instead of directly calling crc32c
authorJohannes Thumshirn <jthumshirn@suse.de>
Wed, 22 May 2019 08:18:58 +0000 (10:18 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Jul 2019 11:35:00 +0000 (13:35 +0200)
commit5852c8b961542f997aa5aeee9c80e745e7af2d63
tree576ffd36a61ef6973f74c07511a01252fabcbac8
parenta94d1d0cb3bf1983fcdf05b59d914dbff4f1f52c
btrfs: use btrfs_csum_data() instead of directly calling crc32c

btrfsic_test_for_metadata() directly calls the crc32c() library function
for calculating the CRC32C checksum, but then uses btrfs_csum_final() to
invert the result.

To ease further refactoring and development around checksumming in BTRFS
convert to calling btrfs_csum_data(), which is a wrapper around
crc32c().

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/check-integrity.c