aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-15 01:30:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-15 01:30:52 -0400
commit6929c358972facf2999f8768815c40dd88514fc2 (patch)
treeb7180709c0d16ef5f2e7344b94b1ca6cfa7461bb /fs
parent23971bdffff5f7c904131dfb41c186711dc2c418 (diff)
parent4c5c30249452aaebf258751ea4222eba3dd3da4c (diff)
Merge tag 'llvmlinux-for-v3.18' of git://git.linuxfoundation.org/llvmlinux/kernel
Pull LLVM updates from Behan Webster: "These patches remove the use of VLAIS using a new SHASH_DESC_ON_STACK macro. Some of the previously accepted VLAIS removal patches haven't used this macro. I will push new patches to consistently use this macro in all those older cases for 3.19" [ More LLVM patches coming in through subsystem trees, and LLVM itself needs some fixes that are already in many distributions but not in released versions of LLVM. Some day this will all "just work" - Linus ] * tag 'llvmlinux-for-v3.18' of git://git.linuxfoundation.org/llvmlinux/kernel: crypto: LLVMLinux: Remove VLAIS usage from crypto/testmgr.c security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c crypto: LLVMLinux: Remove VLAIS usage from libcrc32c.c crypto: LLVMLinux: Remove VLAIS usage from crypto/hmac.c crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt crypto: LLVMLinux: Remove VLAIS from crypto/.../qat_algs.c crypto: LLVMLinux: Remove VLAIS from crypto/omap_sham.c crypto: LLVMLinux: Remove VLAIS from crypto/n2_core.c crypto: LLVMLinux: Remove VLAIS from crypto/mv_cesa.c crypto: LLVMLinux: Remove VLAIS from crypto/ccp/ccp-crypto-sha.c btrfs: LLVMLinux: Remove VLAIS crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/hash.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/btrfs/hash.c b/fs/btrfs/hash.c
index 64f15bb30a81..aae520b2aee5 100644
--- a/fs/btrfs/hash.c
+++ b/fs/btrfs/hash.c
@@ -31,18 +31,16 @@ void btrfs_hash_exit(void)
31 31
32u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length) 32u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length)
33{ 33{
34 struct { 34 SHASH_DESC_ON_STACK(shash, tfm);
35 struct shash_desc shash; 35 u32 *ctx = (u32 *)shash_desc_ctx(shash);
36 char ctx[crypto_shash_descsize(tfm)];
37 } desc;
38 int err; 36 int err;
39 37
40 desc.shash.tfm = tfm; 38 shash->tfm = tfm;
41 desc.shash.flags = 0; 39 shash->flags = 0;
42 *(u32 *)desc.ctx = crc; 40 *ctx = crc;
43 41
44 err = crypto_shash_update(&desc.shash, address, length); 42 err = crypto_shash_update(shash, address, length);
45 BUG_ON(err); 43 BUG_ON(err);
46 44
47 return *(u32 *)desc.ctx; 45 return *ctx;
48} 46}