diff options
Diffstat (limited to 'fs/btrfs/hash.c')
-rw-r--r-- | fs/btrfs/hash.c | 5 |
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) | |||
38 | { | 38 | { |
39 | SHASH_DESC_ON_STACK(shash, tfm); | 39 | SHASH_DESC_ON_STACK(shash, tfm); |
40 | u32 *ctx = (u32 *)shash_desc_ctx(shash); | 40 | u32 *ctx = (u32 *)shash_desc_ctx(shash); |
41 | u32 retval; | ||
41 | int err; | 42 | int err; |
42 | 43 | ||
43 | shash->tfm = tfm; | 44 | shash->tfm = tfm; |
@@ -47,5 +48,7 @@ u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length) | |||
47 | err = crypto_shash_update(shash, address, length); | 48 | err = crypto_shash_update(shash, address, length); |
48 | BUG_ON(err); | 49 | BUG_ON(err); |
49 | 50 | ||
50 | return *ctx; | 51 | retval = *ctx; |
52 | barrier_data(ctx); | ||
53 | return retval; | ||
51 | } | 54 | } |