aboutsummaryrefslogtreecommitdiffstats
path: root/disk-io.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-07-28 19:36:50 +0200
committerDavid Sterba <dsterba@suse.com>2016-07-29 15:04:54 +0200
commit4e4c1e603970a47cc8088d23657a85f2602feef6 (patch)
treecb7010f97ce708aec9d52b218e28effcc1edfd35 /disk-io.c
parent2f732723d6c1e3b6e9205e96da4c600ee72de875 (diff)
downloadbtrfs-progs-4e4c1e603970a47cc8088d23657a85f2602feef6.tar.gz
btrfs-progs-4e4c1e603970a47cc8088d23657a85f2602feef6.tar.xz
btrfs-progs-4e4c1e603970a47cc8088d23657a85f2602feef6.zip
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 <dsterba@suse.com>
Diffstat (limited to 'disk-io.c')
-rw-r--r--disk-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-io.c b/disk-io.c
index fbce506..3647ecc 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,