summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2023-10-28 22:16:59 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2023-11-17 19:16:29 +0800
commita587c5ee0a45dea9ed6fc3d695259da8dc7a5bb3 (patch)
tree333adeac1c2a61a2e169d246551b7d31e2172c0d
parent0fee300f1e61f1adabfbb5c4b9519362ebe740d8 (diff)
downloadlinux-crypto-a587c5ee0a45dea9ed6fc3d695259da8dc7a5bb3.tar.gz
linux-crypto-a587c5ee0a45dea9ed6fc3d695259da8dc7a5bb3.zip
crypto: shash - don't exclude async statuses from error stats
EINPROGRESS and EBUSY have special meaning for async operations. However, shash is always synchronous, so these statuses have no special meaning for shash and don't need to be excluded when handling errors. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/shash.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/crypto/shash.c b/crypto/shash.c
index d5194221..c3f7f6a2 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -23,12 +23,8 @@ static inline struct crypto_istat_hash *shash_get_stat(struct shash_alg *alg)
static inline int crypto_shash_errstat(struct shash_alg *alg, int err)
{
- if (!IS_ENABLED(CONFIG_CRYPTO_STATS))
- return err;
-
- if (err && err != -EINPROGRESS && err != -EBUSY)
+ if (IS_ENABLED(CONFIG_CRYPTO_STATS) && err)
atomic64_inc(&shash_get_stat(alg)->err_cnt);
-
return err;
}