aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-crypt.c')
-rw-r--r--drivers/md/dm-crypt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index d8126ac82960..262ed1816695 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -719,16 +719,15 @@ static void kcryptd_crypt_write_convert(struct dm_crypt_io *io)
719 719
720 remaining -= clone->bi_size; 720 remaining -= clone->bi_size;
721 721
722 crypt_inc_pending(io);
722 r = crypt_convert(cc, &io->ctx); 723 r = crypt_convert(cc, &io->ctx);
723 724
724 if (atomic_dec_and_test(&io->ctx.pending)) { 725 if (atomic_dec_and_test(&io->ctx.pending)) {
725 /* processed, no running async crypto */ 726 /* processed, no running async crypto */
726 crypt_inc_pending(io);
727 kcryptd_crypt_write_io_submit(io, r, 0); 727 kcryptd_crypt_write_io_submit(io, r, 0);
728 if (unlikely(r < 0)) 728 if (unlikely(r < 0))
729 break; 729 break;
730 } else 730 }
731 crypt_inc_pending(io);
732 731
733 /* out of memory -> run queues */ 732 /* out of memory -> run queues */
734 if (unlikely(remaining)) { 733 if (unlikely(remaining)) {