summaryrefslogtreecommitdiff
path: root/crypto/algif_aead.c
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@benyossef.com>2017-10-18 08:00:39 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2017-11-03 22:11:18 +0800
commite5311e8e351fb5adc997cc268faeb7f0d8c16216 (patch)
treec5ab0c8750842975c60d816c227f30ef2ddbff79 /crypto/algif_aead.c
parenta8bb8510fd6d89a0718fb2a3e9aa5e07baaaa8f2 (diff)
downloadlinux-crypto-e5311e8e351fb5adc997cc268faeb7f0d8c16216.tar.gz
linux-crypto-e5311e8e351fb5adc997cc268faeb7f0d8c16216.zip
crypto: algif - move to generic async completion
algif starts several async crypto ops and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algif_aead.c')
-rw-r--r--crypto/algif_aead.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
index 516b38c3..aacae083 100644
--- a/crypto/algif_aead.c
+++ b/crypto/algif_aead.c
@@ -278,11 +278,11 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
/* Synchronous operation */
aead_request_set_callback(&areq->cra_u.aead_req,
CRYPTO_TFM_REQ_MAY_BACKLOG,
- af_alg_complete, &ctx->completion);
- err = af_alg_wait_for_completion(ctx->enc ?
+ crypto_req_done, &ctx->wait);
+ err = crypto_wait_req(ctx->enc ?
crypto_aead_encrypt(&areq->cra_u.aead_req) :
crypto_aead_decrypt(&areq->cra_u.aead_req),
- &ctx->completion);
+ &ctx->wait);
}
/* AIO operation in progress */
@@ -554,7 +554,7 @@ static int aead_accept_parent_nokey(void *private, struct sock *sk)
ctx->merge = 0;
ctx->enc = 0;
ctx->aead_assoclen = 0;
- af_alg_init_completion(&ctx->completion);
+ crypto_init_wait(&ctx->wait);
ask->private = ctx;