crypto: aead - Count error stats differently
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 16 Feb 2023 10:35:11 +0000 (18:35 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 14 Mar 2023 09:06:41 +0000 (17:06 +0800)
commit0df4adf8682a017e43579ac8c9ec1a31c538e940
treed27c0800efad1dfd15ac24fba0233f2eb160f95d
parented0733eaa579c49dbfeaec14d4071a69a49fdde4
crypto: aead - Count error stats differently

Move all stat code specific to aead into the aead 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/aead.c
crypto/algapi.c
crypto/crypto_user_stat.c
include/crypto/aead.h
include/linux/crypto.h