dm: use dm_target_offset macro
Use new dm_target_offset() macro to avoid most references to ti->begin in dm targets. Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
@@ -74,7 +74,7 @@ static sector_t linear_map_sector(struct dm_target *ti, sector_t bi_sector)
|
||||
{
|
||||
struct linear_c *lc = ti->private;
|
||||
|
||||
return lc->start + (bi_sector - ti->begin);
|
||||
return lc->start + dm_target_offset(ti, bi_sector);
|
||||
}
|
||||
|
||||
static void linear_map_bio(struct dm_target *ti, struct bio *bio)
|
||||
|
Reference in New Issue
Block a user