summaryrefslogtreecommitdiff
path: root/crypto/shash.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-01-03 07:04:38 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-01-09 06:30:57 +0300
commita39c66cc2f6108c8346dc882bdcf72861aaca956 (patch)
tree5032d5672d0e339c92cd992f8e70d7638fce140f /crypto/shash.c
parent758ec5ac5be8923b92c5214d91f6ba1236b95356 (diff)
downloadlinux-a39c66cc2f6108c8346dc882bdcf72861aaca956.tar.xz
crypto: shash - convert shash_free_instance() to new style
Convert shash_free_instance() and its users to the new way of freeing instances, where a ->free() method is installed to the instance struct itself. This replaces the weakly-typed method crypto_template::free(). This will allow removing support for the old way of freeing instances. Also give shash_free_instance() a more descriptive name to reflect that it's only for instances with a single spawn, not for any instance. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/shash.c')
-rw-r--r--crypto/shash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/shash.c b/crypto/shash.c
index 2f6adb49727b..e05e75b0f402 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -590,12 +590,12 @@ int shash_register_instance(struct crypto_template *tmpl,
}
EXPORT_SYMBOL_GPL(shash_register_instance);
-void shash_free_instance(struct crypto_instance *inst)
+void shash_free_singlespawn_instance(struct shash_instance *inst)
{
- crypto_drop_spawn(crypto_instance_ctx(inst));
- kfree(shash_instance(inst));
+ crypto_drop_spawn(shash_instance_ctx(inst));
+ kfree(inst);
}
-EXPORT_SYMBOL_GPL(shash_free_instance);
+EXPORT_SYMBOL_GPL(shash_free_singlespawn_instance);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Synchronous cryptographic hash type");