diff options
Diffstat (limited to 'drivers/md/dm-delay.c')
-rw-r--r-- | drivers/md/dm-delay.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c index a8a511c053a5..42c3a27a14cc 100644 --- a/drivers/md/dm-delay.c +++ b/drivers/md/dm-delay.c | |||
@@ -277,14 +277,15 @@ static int delay_map(struct dm_target *ti, struct bio *bio) | |||
277 | if ((bio_data_dir(bio) == WRITE) && (dc->dev_write)) { | 277 | if ((bio_data_dir(bio) == WRITE) && (dc->dev_write)) { |
278 | bio->bi_bdev = dc->dev_write->bdev; | 278 | bio->bi_bdev = dc->dev_write->bdev; |
279 | if (bio_sectors(bio)) | 279 | if (bio_sectors(bio)) |
280 | bio->bi_sector = dc->start_write + | 280 | bio->bi_iter.bi_sector = dc->start_write + |
281 | dm_target_offset(ti, bio->bi_sector); | 281 | dm_target_offset(ti, bio->bi_iter.bi_sector); |
282 | 282 | ||
283 | return delay_bio(dc, dc->write_delay, bio); | 283 | return delay_bio(dc, dc->write_delay, bio); |
284 | } | 284 | } |
285 | 285 | ||
286 | bio->bi_bdev = dc->dev_read->bdev; | 286 | bio->bi_bdev = dc->dev_read->bdev; |
287 | bio->bi_sector = dc->start_read + dm_target_offset(ti, bio->bi_sector); | 287 | bio->bi_iter.bi_sector = dc->start_read + |
288 | dm_target_offset(ti, bio->bi_iter.bi_sector); | ||
288 | 289 | ||
289 | return delay_bio(dc, dc->read_delay, bio); | 290 | return delay_bio(dc, dc->read_delay, bio); |
290 | } | 291 | } |