diff options
Diffstat (limited to 'drivers/md/dm-switch.c')
-rw-r--r-- | drivers/md/dm-switch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-switch.c b/drivers/md/dm-switch.c index ff9ac4be4721..09a688b3d48c 100644 --- a/drivers/md/dm-switch.c +++ b/drivers/md/dm-switch.c | |||
@@ -311,11 +311,11 @@ error: | |||
311 | static int switch_map(struct dm_target *ti, struct bio *bio) | 311 | static int switch_map(struct dm_target *ti, struct bio *bio) |
312 | { | 312 | { |
313 | struct switch_ctx *sctx = ti->private; | 313 | struct switch_ctx *sctx = ti->private; |
314 | sector_t offset = dm_target_offset(ti, bio->bi_sector); | 314 | sector_t offset = dm_target_offset(ti, bio->bi_iter.bi_sector); |
315 | unsigned path_nr = switch_get_path_nr(sctx, offset); | 315 | unsigned path_nr = switch_get_path_nr(sctx, offset); |
316 | 316 | ||
317 | bio->bi_bdev = sctx->path_list[path_nr].dmdev->bdev; | 317 | bio->bi_bdev = sctx->path_list[path_nr].dmdev->bdev; |
318 | bio->bi_sector = sctx->path_list[path_nr].start + offset; | 318 | bio->bi_iter.bi_sector = sctx->path_list[path_nr].start + offset; |
319 | 319 | ||
320 | return DM_MAPIO_REMAPPED; | 320 | return DM_MAPIO_REMAPPED; |
321 | } | 321 | } |