From b441a262e7d1c56fbe21794c91d7a9c83809113f Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Thu, 12 Aug 2010 04:14:11 +0100 Subject: 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 --- drivers/md/dm-linear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/md/dm-linear.c') diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index f043b5f433b2..3921e3bb43c1 100644 --- a/drivers/md/dm-linear.c +++ b/drivers/md/dm-linear.c @@ -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) -- cgit v1.2.3