crypto: hash - Count error stats differently
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 16 Feb 2023 10:35:15 +0000 (18:35 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 14 Mar 2023 09:06:41 +0000 (17:06 +0800)
commit42808e5dc602c12ef3eb42cf96cb416b55205fa4
treee030d98900ddfa57ce8b2df32c94d2794e615635
parent035d78a11c56828bb4923fa87eeb9ed2546d52bd
crypto: hash - Count error stats differently

Move all stat code specific to hash into the hash code.

While we're at it, change the stats so that bytes and counts
are always incremented even in case of error.  This allows the
reference counting to be removed as we can now increment the
counters prior to the operation.

After the operation we simply increase the error count if necessary.
This is safe as errors can only occur synchronously (or rather,
the existing code already ignored asynchronous errors which are
only visible to the callback function).

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ahash.c
crypto/algapi.c
crypto/crypto_user_stat.c
crypto/hash.h [new file with mode: 0644]
crypto/shash.c
include/crypto/hash.h
include/linux/crypto.h