X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=crypto%2Finternal.h;h=37aa652ce5ce6f89e4738ac07dd770b8df4a6ac9;hb=c324b44c34050cf2a9b58830e11c974806bd85d8;hp=37515beafc8ce44ff501d15d617968248656b59f;hpb=de8fd087b280797977b012a4275ee53ff2999f3f;p=linux-2.6 diff --git a/crypto/internal.h b/crypto/internal.h index 37515beafc..37aa652ce5 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -17,6 +17,7 @@ #include #include #include +#include #include extern enum km_type crypto_km_types[]; @@ -38,7 +39,7 @@ static inline void crypto_kunmap(void *vaddr, int out) static inline void crypto_yield(struct crypto_tfm *tfm) { - if (!in_atomic()) + if (tfm->crt_flags & CRYPTO_TFM_REQ_MAY_SLEEP) cond_resched(); }