dm-buffered: use dm_target_offset Use dm_target_offset so that it works if the target is not the first target in the table. Signed-off-by: Mikulas Patocka --- drivers/md/dm-buffered-target.c | 2 ++ 1 file changed, 2 insertions(+) Index: linux-2.6/drivers/md/dm-buffered-target.c =================================================================== --- linux-2.6.orig/drivers/md/dm-buffered-target.c +++ linux-2.6/drivers/md/dm-buffered-target.c @@ -477,6 +477,8 @@ static int buffered_map(struct dm_target struct buffered_c *bc = ti->private; bool queue; + bio->bi_iter.bi_sector = dm_target_offset(ti, bio->bi_iter.bi_sector); + spin_lock_irq(&bc->lock); queue = bio_list_empty(&bc->bios); bio_list_add(&bc->bios, bio);