diff options
Diffstat (limited to 'drivers/md/dm-crypt.c')
-rw-r--r-- | drivers/md/dm-crypt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 6401bfa0adff..368e8e98f705 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c | |||
@@ -1284,7 +1284,7 @@ static int crypt_map(struct dm_target *ti, struct bio *bio, | |||
1284 | return DM_MAPIO_REMAPPED; | 1284 | return DM_MAPIO_REMAPPED; |
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | io = crypt_io_alloc(ti, bio, bio->bi_sector - ti->begin); | 1287 | io = crypt_io_alloc(ti, bio, dm_target_offset(ti, bio->bi_sector)); |
1288 | 1288 | ||
1289 | if (bio_data_dir(io->base_bio) == READ) | 1289 | if (bio_data_dir(io->base_bio) == READ) |
1290 | kcryptd_queue_io(io); | 1290 | kcryptd_queue_io(io); |
@@ -1406,7 +1406,7 @@ static int crypt_merge(struct dm_target *ti, struct bvec_merge_data *bvm, | |||
1406 | return max_size; | 1406 | return max_size; |
1407 | 1407 | ||
1408 | bvm->bi_bdev = cc->dev->bdev; | 1408 | bvm->bi_bdev = cc->dev->bdev; |
1409 | bvm->bi_sector = cc->start + bvm->bi_sector - ti->begin; | 1409 | bvm->bi_sector = cc->start + dm_target_offset(ti, bvm->bi_sector); |
1410 | 1410 | ||
1411 | return min(max_size, q->merge_bvec_fn(q, bvm, biovec)); | 1411 | return min(max_size, q->merge_bvec_fn(q, bvm, biovec)); |
1412 | } | 1412 | } |