diff options
author | Eric Biggers <ebiggers@google.com> | 2023-10-28 22:16:59 -0700 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-11-17 19:16:29 +0800 |
commit | fea845fd79b534948a707511591c059d293668c1 (patch) | |
tree | 4c211331de1e2593008d1a5c099657e54c038aa8 | |
parent | 84d0217336d76fc4ba5dcd71ca195f4dc71c1d4d (diff) |
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.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crypto/shash.c b/crypto/shash.c index d5194221c88c..c3f7f6a25280 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; } |