aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/dm-crypt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 64ffa0ea8ca4..b41f945df8a1 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -460,7 +460,7 @@ static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone)
460 * One of the bios was finished. Check for completion of 460 * One of the bios was finished. Check for completion of
461 * the whole request and correctly clean up the buffer. 461 * the whole request and correctly clean up the buffer.
462 */ 462 */
463static void dec_pending(struct dm_crypt_io *io, int error) 463static void crypt_dec_pending(struct dm_crypt_io *io, int error)
464{ 464{
465 struct crypt_config *cc = (struct crypt_config *) io->target->private; 465 struct crypt_config *cc = (struct crypt_config *) io->target->private;
466 466
@@ -533,7 +533,7 @@ static void crypt_endio(struct bio *clone, int error)
533 533
534out: 534out:
535 bio_put(clone); 535 bio_put(clone);
536 dec_pending(io, error); 536 crypt_dec_pending(io, error);
537} 537}
538 538
539static void clone_init(struct dm_crypt_io *io, struct bio *clone) 539static void clone_init(struct dm_crypt_io *io, struct bio *clone)
@@ -563,7 +563,7 @@ static void process_read(struct dm_crypt_io *io)
563 */ 563 */
564 clone = bio_alloc_bioset(GFP_NOIO, bio_segments(base_bio), cc->bs); 564 clone = bio_alloc_bioset(GFP_NOIO, bio_segments(base_bio), cc->bs);
565 if (unlikely(!clone)) { 565 if (unlikely(!clone)) {
566 dec_pending(io, -ENOMEM); 566 crypt_dec_pending(io, -ENOMEM);
567 return; 567 return;
568 } 568 }
569 569
@@ -598,7 +598,7 @@ static void process_write(struct dm_crypt_io *io)
598 while (remaining) { 598 while (remaining) {
599 clone = crypt_alloc_buffer(io, remaining); 599 clone = crypt_alloc_buffer(io, remaining);
600 if (unlikely(!clone)) { 600 if (unlikely(!clone)) {
601 dec_pending(io, -ENOMEM); 601 crypt_dec_pending(io, -ENOMEM);
602 return; 602 return;
603 } 603 }
604 604
@@ -608,7 +608,7 @@ static void process_write(struct dm_crypt_io *io)
608 if (unlikely(crypt_convert(cc, &ctx) < 0)) { 608 if (unlikely(crypt_convert(cc, &ctx) < 0)) {
609 crypt_free_buffer_pages(cc, clone); 609 crypt_free_buffer_pages(cc, clone);
610 bio_put(clone); 610 bio_put(clone);
611 dec_pending(io, -EIO); 611 crypt_dec_pending(io, -EIO);
612 return; 612 return;
613 } 613 }
614 614
@@ -643,7 +643,7 @@ static void process_read_endio(struct dm_crypt_io *io)
643 crypt_convert_init(cc, &ctx, io->base_bio, io->base_bio, 643 crypt_convert_init(cc, &ctx, io->base_bio, io->base_bio,
644 io->base_bio->bi_sector - io->target->begin, 0); 644 io->base_bio->bi_sector - io->target->begin, 0);
645 645
646 dec_pending(io, crypt_convert(cc, &ctx)); 646 crypt_dec_pending(io, crypt_convert(cc, &ctx));
647} 647}
648 648
649static void kcryptd_do_work(struct work_struct *work) 649static void kcryptd_do_work(struct work_struct *work)