summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/send.c
diff options
context:
space:
mode:
authorJohannes Thumshirn2019-05-22 10:18:59 +0200
committerDavid Sterba2019-07-01 13:35:00 +0200
commit65019df8c3b0efa363c30ca4dd69a1a370a3ebe8 (patch)
tree868cb694ca3028669910449e92b11426e54b97f9 /fs/btrfs/send.c
parentbtrfs: use btrfs_csum_data() instead of directly calling crc32c (diff)
downloadkernel-qcow2-linux-65019df8c3b0efa363c30ca4dd69a1a370a3ebe8.tar.gz
kernel-qcow2-linux-65019df8c3b0efa363c30ca4dd69a1a370a3ebe8.tar.xz
kernel-qcow2-linux-65019df8c3b0efa363c30ca4dd69a1a370a3ebe8.zip
btrfs: resurrect btrfs_crc32c()
Commit 9678c54388b6 ("btrfs: Remove custom crc32c init code") removed the btrfs_crc32c() function, because it was a duplicate of the crc32c() library function we already have in the kernel. Resurrect it as a shim wrapper over crc32c() to make following transformations of the checksumming code in btrfs easier. Also provide a btrfs_crc32_final() to ease following transformations. 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>
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r--fs/btrfs/send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index f7fe4770f0e5..49edcc709a99 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -686,7 +686,7 @@ static int send_cmd(struct send_ctx *sctx)
hdr->len = cpu_to_le32(sctx->send_size - sizeof(*hdr));
hdr->crc = 0;
- crc = crc32c(0, (unsigned char *)sctx->send_buf, sctx->send_size);
+ crc = btrfs_crc32c(0, (unsigned char *)sctx->send_buf, sctx->send_size);
hdr->crc = cpu_to_le32(crc);
ret = write_buf(sctx->send_filp, sctx->send_buf, sctx->send_size,