Merge tag 'for-4.14/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / drivers / md / dm-switch.c
index 83a371d..4c8de1f 100644 (file)
@@ -322,7 +322,7 @@ static int switch_map(struct dm_target *ti, struct bio *bio)
        sector_t offset = dm_target_offset(ti, bio->bi_iter.bi_sector);
        unsigned path_nr = switch_get_path_nr(sctx, offset);
 
-       bio->bi_bdev = sctx->path_list[path_nr].dmdev->bdev;
+       bio_set_dev(bio, sctx->path_list[path_nr].dmdev->bdev);
        bio->bi_iter.bi_sector = sctx->path_list[path_nr].start + offset;
 
        return DM_MAPIO_REMAPPED;