aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/hash.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-06-30 14:26:31 +0800
committerAlex Shi <alex.shi@linaro.org>2017-06-30 14:26:31 +0800
commit78278fb152735c686cb13e1ae3bcee78fc2cd154 (patch)
treeed3f669fbb4422bf3dfaa6b20ea992c04c1eac01 /fs/btrfs/hash.c
parent084eedbddaa526f53b20291ee7176be269620301 (diff)
parent92905e331aea278665c4b27fbb13c4547a8bcbb0 (diff)
Merge tag 'v4.9.35' into linux-linaro-lsk-v4.9lsk-v4.9-17.06
This is the 4.9.35 stable release
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;
}