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 <jthumsh...@suse.de>
---
 disk-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/disk-io.c b/disk-io.c
index be44eead5cef..01314504a50a 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -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) {
-- 
2.16.4

Reply via email to