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 <agk@redhat.com>
This commit is contained in:
Alasdair G Kergon 2012-03-28 18:41:28 +01:00
parent 2dd9c257fb
commit 6efd6e8309
1 changed files with 1 additions and 1 deletions

View File

@ -2389,7 +2389,7 @@ out_unlock:
static int thin_map(struct dm_target *ti, struct bio *bio,
union map_info *map_context)
{
bio->bi_sector -= ti->begin;
bio->bi_sector = dm_target_offset(ti, bio->bi_sector);
return thin_bio_map(ti, bio, map_context);
}