[CRYPTO] api: Wake up all waiters when larval completes
Right now when a larval matures or when it dies of an error we
only wake up one waiter. This would cause other waiters to timeout
unnecessarily. This patch changes it to use complete_all to wake
up all waiters.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/crypto/algapi.c b/crypto/algapi.c
index f137a432..38aa9e99 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -34,7 +34,7 @@
if (alg) {
if (crypto_is_larval(alg)) {
struct crypto_larval *larval = (void *)alg;
- complete(&larval->completion);
+ complete_all(&larval->completion);
}
crypto_mod_put(alg);
}
@@ -164,7 +164,7 @@
continue;
larval->adult = alg;
- complete(&larval->completion);
+ complete_all(&larval->completion);
continue;
}