From: Eric Biggers Date: Sun, 29 Oct 2023 05:16:59 +0000 (-0700) Subject: crypto: shash - don't exclude async statuses from error stats X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fea845fd79b534948a707511591c059d293668c1;p=linux.git 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 Signed-off-by: Herbert Xu --- diff --git a/crypto/shash.c b/crypto/shash.c index d5194221c88cb..c3f7f6a252803 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; }