summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/hash.c
diff options
context:
space:
mode:
authorDmitry Torokhov2017-09-04 18:22:54 +0200
committerDmitry Torokhov2017-09-04 18:22:54 +0200
commita6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8 (patch)
tree8960e571a398b5d32e72bdb9c89ce965daa870ab /fs/btrfs/hash.c
parentInput: xpad - fix PowerA init quirk for some gamepad models (diff)
parentInput: byd - make array seq static, reduces object code size (diff)
downloadkernel-qcow2-linux-a6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8.tar.gz
kernel-qcow2-linux-a6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8.tar.xz
kernel-qcow2-linux-a6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8.zip
Merge branch 'next' into for-linus
Prepare input updates for 4.14 merge window.
Diffstat (limited to 'fs/btrfs/hash.c')
-rw-r--r--fs/btrfs/hash.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/hash.c b/fs/btrfs/hash.c
index a97fdc156a03..baacc1866861 100644
--- a/fs/btrfs/hash.c
+++ b/fs/btrfs/hash.c
@@ -38,6 +38,7 @@ u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length)
{
SHASH_DESC_ON_STACK(shash, tfm);
u32 *ctx = (u32 *)shash_desc_ctx(shash);
+ u32 retval;
int err;
shash->tfm = tfm;
@@ -47,5 +48,7 @@ u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length)
err = crypto_shash_update(shash, address, length);
BUG_ON(err);
- return *ctx;
+ retval = *ctx;
+ barrier_data(ctx);
+ return retval;
}