]> git.hungrycats.org Git - linux/commitdiff
Revert "btrfs: LLVMLinux: Remove VLAIS"
authorZygo Blaxell <zblaxell@serenity.furryterror.org>
Wed, 3 Dec 2014 03:54:14 +0000 (22:54 -0500)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Wed, 3 Dec 2014 15:17:08 +0000 (10:17 -0500)
This reverts commit 00647c3f18907b98afda5eb8217d500738967da3.

fs/btrfs/hash.c

index 4bf4d3a3e5c46b41b92d1738f991f11f8e78d387..85889aa82c62dd8d05d9c8a01cff08f86afc4d05 100644 (file)
@@ -33,16 +33,18 @@ void btrfs_hash_exit(void)
 
 u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length)
 {
-       SHASH_DESC_ON_STACK(shash, tfm);
-       u32 *ctx = (u32 *)shash_desc_ctx(shash);
+       struct {
+               struct shash_desc shash;
+               char ctx[crypto_shash_descsize(tfm)];
+       } desc;
        int err;
 
-       shash->tfm = tfm;
-       shash->flags = 0;
-       *ctx = crc;
+       desc.shash.tfm = tfm;
+       desc.shash.flags = 0;
+       *(u32 *)desc.ctx = crc;
 
-       err = crypto_shash_update(shash, address, length);
+       err = crypto_shash_update(&desc.shash, address, length);
        BUG_ON(err);
 
-       return *ctx;
+       return *(u32 *)desc.ctx;
 }