diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 3d975db86434f4ba1fd6087e9df3f5de804d5749..17ddca293965c390c17ae58fadd0806f1e134cdd 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1934,6 +1934,7 @@ static int dmcrypt_write(void *data) io = crypt_io_from_node(rb_first(&write_tree)); rb_erase(&io->rb_node, &write_tree); kcryptd_io_write(io); + cond_resched(); } while (!RB_EMPTY_ROOT(&write_tree)); blk_finish_plug(&plug); }