Skip to content

Commit 6efd6e8

Browse files
committed
dm thin: use dm_target_offset
Use dm_target_offset wrapper instead of referencing the awkward ti->begin explicitly. Signed-off-by: Alasdair G Kergon <[email protected]>
1 parent 2dd9c25 commit 6efd6e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/dm-thin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2389,7 +2389,7 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)
23892389
static int thin_map(struct dm_target *ti, struct bio *bio,
23902390
union map_info *map_context)
23912391
{
2392-
bio->bi_sector -= ti->begin;
2392+
bio->bi_sector = dm_target_offset(ti, bio->bi_sector);
23932393

23942394
return thin_bio_map(ti, bio, map_context);
23952395
}

0 commit comments

Comments
 (0)