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 0042636ad375..d8126ac82960 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -674,6 +674,7 @@ static void kcryptd_crypt_write_io_submit(struct dm_crypt_io *io,
674 crypt_free_buffer_pages(cc, clone); 674 crypt_free_buffer_pages(cc, clone);
675 bio_put(clone); 675 bio_put(clone);
676 io->error = -EIO; 676 io->error = -EIO;
677 crypt_dec_pending(io);
677 return; 678 return;
678 } 679 }
679 680
@@ -724,10 +725,8 @@ static void kcryptd_crypt_write_convert(struct dm_crypt_io *io)
724 /* processed, no running async crypto */ 725 /* processed, no running async crypto */
725 crypt_inc_pending(io); 726 crypt_inc_pending(io);
726 kcryptd_crypt_write_io_submit(io, r, 0); 727 kcryptd_crypt_write_io_submit(io, r, 0);
727 if (unlikely(r < 0)) { 728 if (unlikely(r < 0))
728 crypt_dec_pending(io);
729 break; 729 break;
730 }
731 } else 730 } else
732 crypt_inc_pending(io); 731 crypt_inc_pending(io);
733 732