Skip to content

Commit

Permalink
dm thin: use dm_target_offset
Browse files Browse the repository at this point in the history
Use dm_target_offset wrapper instead of referencing the awkward ti->begin
explicitly.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Alasdair G Kergon committed Mar 28, 2012
1 parent 2dd9c25 commit 6efd6e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm-thin.c
Original file line number Diff line number Diff line change
Expand Up @@ -2389,7 +2389,7 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)
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);
}
Expand Down

0 comments on commit 6efd6e8

Please sign in to comment.