mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
dm-crypt: set atomic as false when calling crypt_convert() in kworker
Both kcryptd_crypt_write_continue() and kcryptd_crypt_read_continue() are running in the kworker context, it is OK to call cond_resched(), Therefore, set atomic as false when invoking crypt_convert() under kworker context. Signed-off-by: Hou Tao <houtao1@huawei.com> Reviewed-by: Ignat Korchagin <ignat@cloudflare.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
This commit is contained in:
parent
6845de78ae
commit
6fd2cb38c0
|
|
@ -2098,7 +2098,7 @@ static void kcryptd_crypt_write_continue(struct work_struct *work)
|
|||
wait_for_completion(&ctx->restart);
|
||||
reinit_completion(&ctx->restart);
|
||||
|
||||
r = crypt_convert(cc, &io->ctx, true, false);
|
||||
r = crypt_convert(cc, &io->ctx, false, false);
|
||||
if (r)
|
||||
io->error = r;
|
||||
crypt_finished = atomic_dec_and_test(&ctx->cc_pending);
|
||||
|
|
@ -2203,7 +2203,7 @@ static void kcryptd_crypt_read_continue(struct work_struct *work)
|
|||
wait_for_completion(&io->ctx.restart);
|
||||
reinit_completion(&io->ctx.restart);
|
||||
|
||||
r = crypt_convert(cc, &io->ctx, true, false);
|
||||
r = crypt_convert(cc, &io->ctx, false, false);
|
||||
if (r)
|
||||
io->error = r;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user