Commit c7f1b204 authored by Milan Broz's avatar Milan Broz Committed by Alasdair G Kergon
Browse files

dm crypt: use cond_resched

Add cond_resched() to prevent monopolising CPU when processing large bios.

dm-crypt processes encryption of bios in sector units.  If the bio request
is big it can spend a long time in the encryption call.
Signed-off-by: default avatarMilan Broz <>
Tested-by: default avatarYan Li <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarAlasdair G Kergon <>
parent e1441b9a
......@@ -432,6 +432,7 @@ static int crypt_convert(struct crypt_config *cc,
case 0:
/* error */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment