crypto: skcipher - call cond_resched() directly
In skcipher_walk_done(), instead of calling crypto_yield() which requires a translation between flags, just call cond_resched() directly. This has the same effect. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
8b13c2239d
commit
878d87fc68
1 changed files with 2 additions and 2 deletions
|
@ -146,8 +146,8 @@ unmap_src:
|
||||||
scatterwalk_done(&walk->out, 1, total);
|
scatterwalk_done(&walk->out, 1, total);
|
||||||
|
|
||||||
if (total) {
|
if (total) {
|
||||||
crypto_yield(walk->flags & SKCIPHER_WALK_SLEEP ?
|
if (walk->flags & SKCIPHER_WALK_SLEEP)
|
||||||
CRYPTO_TFM_REQ_MAY_SLEEP : 0);
|
cond_resched();
|
||||||
walk->flags &= ~(SKCIPHER_WALK_SLOW | SKCIPHER_WALK_COPY |
|
walk->flags &= ~(SKCIPHER_WALK_SLOW | SKCIPHER_WALK_COPY |
|
||||||
SKCIPHER_WALK_DIFF);
|
SKCIPHER_WALK_DIFF);
|
||||||
return skcipher_walk_next(walk);
|
return skcipher_walk_next(walk);
|
||||||
|
|
Loading…
Add table
Reference in a new issue