From 4e4c1e603970a47cc8088d23657a85f2602feef6 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 28 Jul 2016 19:36:50 +0200 Subject: [PATCH] btrfs-progs: use proper unaligned helper in btrfs_csum_final This will not cause unaligned access as the checksum is at the beginning of btrfs_header and thus aligned to a page, but for clarity use the helper. Signed-off-by: David Sterba --- disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk-io.c b/disk-io.c index fbce506a..3647ecca 100644 --- a/disk-io.c +++ b/disk-io.c @@ -125,7 +125,7 @@ u32 btrfs_csum_data(struct btrfs_root *root, char *data, u32 seed, size_t len) void btrfs_csum_final(u32 crc, char *result) { - *(__le32 *)result = ~cpu_to_le32(crc); + put_unaligned_le32(~crc, result); } static int __csum_tree_block_size(struct extent_buffer *buf, u16 csum_size,