Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2005-02-10 16:04:10 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-02-10 16:04:10 -0800
commit4e979b187f7528fcc924f21a5a7b805d9e5d413f (patch)
treee1526b84da3c0dd44a13c5b10e587706d99f2988
parent9bf9a3f4be5f8199d2a8190dddb79e3bac511c98 (diff)
[PATCH] portability problem in dm-stripe.c
dm-stripe does do_div() on potentially 32bit data. do_div() implementation has every right to be Not Happy(tm) with that... The fix is obvious - that's what sector_div() is for... Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/md/dm-stripe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
index 38a3d6532b08..16acecc11e9c 100644
--- a/drivers/md/dm-stripe.c
+++ b/drivers/md/dm-stripe.c
@@ -174,7 +174,7 @@ static int stripe_map(struct dm_target *ti, struct bio *bio,
sector_t offset = bio->bi_sector - ti->begin;
sector_t chunk = offset >> sc->chunk_shift;
- uint32_t stripe = do_div(chunk, sc->stripes);
+ uint32_t stripe = sector_div(chunk, sc->stripes);
bio->bi_bdev = sc->stripe[stripe].dev->bdev;
bio->bi_sector = sc->stripe[stripe].physical_start +