Skip to content

Commit

Permalink
dm crypt: use in_hardirq() instead of deprecated in_irq()
Browse files Browse the repository at this point in the history
Signed-off-by: Changbin Du <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
  • Loading branch information
changbindu authored and snitm committed Aug 20, 2021
1 parent 17bfa96 commit d3703ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/dm-crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2223,11 +2223,11 @@ static void kcryptd_queue_crypt(struct dm_crypt_io *io)
if ((bio_data_dir(io->base_bio) == READ && test_bit(DM_CRYPT_NO_READ_WORKQUEUE, &cc->flags)) ||
(bio_data_dir(io->base_bio) == WRITE && test_bit(DM_CRYPT_NO_WRITE_WORKQUEUE, &cc->flags))) {
/*
* in_irq(): Crypto API's skcipher_walk_first() refuses to work in hard IRQ context.
* in_hardirq(): Crypto API's skcipher_walk_first() refuses to work in hard IRQ context.
* irqs_disabled(): the kernel may run some IO completion from the idle thread, but
* it is being executed with irqs disabled.
*/
if (in_irq() || irqs_disabled()) {
if (in_hardirq() || irqs_disabled()) {
tasklet_init(&io->tasklet, kcryptd_crypt_tasklet, (unsigned long)&io->work);
tasklet_schedule(&io->tasklet);
return;
Expand Down

0 comments on commit d3703ef

Please sign in to comment.