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>
This commit is contained in:

committed by
Herbert Xu

parent
ada69a1639
commit
2c3f8b1621
@@ -481,33 +481,6 @@ int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_cmsg_send);
|
||||
|
||||
int af_alg_wait_for_completion(int err, struct af_alg_completion *completion)
|
||||
{
|
||||
switch (err) {
|
||||
case -EINPROGRESS:
|
||||
case -EBUSY:
|
||||
wait_for_completion(&completion->completion);
|
||||
reinit_completion(&completion->completion);
|
||||
err = completion->err;
|
||||
break;
|
||||
};
|
||||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_wait_for_completion);
|
||||
|
||||
void af_alg_complete(struct crypto_async_request *req, int err)
|
||||
{
|
||||
struct af_alg_completion *completion = req->data;
|
||||
|
||||
if (err == -EINPROGRESS)
|
||||
return;
|
||||
|
||||
completion->err = err;
|
||||
complete(&completion->completion);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_complete);
|
||||
|
||||
/**
|
||||
* af_alg_alloc_tsgl - allocate the TX SGL
|
||||
*
|
||||
|
Reference in New Issue
Block a user