diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2019-05-22 11:18:59 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-07-01 14:35:00 +0300 |
commit | 65019df8c3b0efa363c30ca4dd69a1a370a3ebe8 (patch) | |
tree | 868cb694ca3028669910449e92b11426e54b97f9 /fs/btrfs/send.c | |
parent | 5852c8b961542f997aa5aeee9c80e745e7af2d63 (diff) | |
download | linux-65019df8c3b0efa363c30ca4dd69a1a370a3ebe8.tar.xz |
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.c | 2 |
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, |