aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-delay.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-delay.c')
-rw-r--r--drivers/md/dm-delay.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c
index 2f91d6d4a2cc..fc8482a65dd2 100644
--- a/drivers/md/dm-delay.c
+++ b/drivers/md/dm-delay.c
@@ -289,14 +289,15 @@ static int delay_map(struct dm_target *ti, struct bio *bio)
289 if ((bio_data_dir(bio) == WRITE) && (dc->dev_write)) { 289 if ((bio_data_dir(bio) == WRITE) && (dc->dev_write)) {
290 bio->bi_bdev = dc->dev_write->bdev; 290 bio->bi_bdev = dc->dev_write->bdev;
291 if (bio_sectors(bio)) 291 if (bio_sectors(bio))
292 bio->bi_sector = dc->start_write + 292 bio->bi_iter.bi_sector = dc->start_write +
293 dm_target_offset(ti, bio->bi_sector); 293 dm_target_offset(ti, bio->bi_iter.bi_sector);
294 294
295 return delay_bio(dc, dc->write_delay, bio); 295 return delay_bio(dc, dc->write_delay, bio);
296 } 296 }
297 297
298 bio->bi_bdev = dc->dev_read->bdev; 298 bio->bi_bdev = dc->dev_read->bdev;
299 bio->bi_sector = dc->start_read + dm_target_offset(ti, bio->bi_sector); 299 bio->bi_iter.bi_sector = dc->start_read +
300 dm_target_offset(ti, bio->bi_iter.bi_sector);
300 301
301 return delay_bio(dc, dc->read_delay, bio); 302 return delay_bio(dc, dc->read_delay, bio);
302} 303}