crypto: shash - don't exclude async statuses from error stats
authorEric Biggers <ebiggers@google.com>
Sun, 29 Oct 2023 05:16:59 +0000 (22:16 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Nov 2023 11:16:29 +0000 (19:16 +0800)
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>
crypto/shash.c

index d5194221c88cb95bb53aa766c75504ad185b6f3c..c3f7f6a2528036e2ec836bbce9344f8bca70aec8 100644 (file)
@@ -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;
 }