summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2026-05-22 00:30:26 -0500
committerJakub Kicinski <kuba@kernel.org>2026-05-28 17:45:46 -0700
commit3065170bfc7f256f9d1339062dae331f731c6763 (patch)
tree649d7939c5cc51ce40b60ef02c4854970b61d863 /include/linux
parent590a46c68a7b0f9ebbd0248a5a00c472f249c204 (diff)
crypto: api - Remove per-tfm refcount
This reverts commit ae131f4970f0 ("crypto: api - Add crypto_tfm_get"). The refcount in struct crypto_tfm was added solely to support crypto_clone_tfm(). Before then it was a simple non-refcounted object. Since crypto_clone_tfm() has been removed, remove the refcount as well. Note that this eliminates an expensive atomic operation from every tfm freeing operation. So this revert doesn't just remove unused code, but it also fixes a performance regression. Signed-off-by: Eric Biggers <ebiggers@kernel.org> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Link: https://patch.msgid.link/20260522053028.91165-5-ebiggers@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/crypto.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index a2137e19be7d..b7c97f1c47c9 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -409,7 +409,6 @@ int crypto_has_alg(const char *name, u32 type, u32 mask);
*/
struct crypto_tfm {
- refcount_t refcnt;
u32 crt_flags;