diff options
author | Yufen Yu <yuyufen@huawei.com> | 2020-07-23 06:29:05 +0300 |
---|---|---|
committer | Song Liu <songliubraving@fb.com> | 2020-07-23 08:49:46 +0300 |
commit | 83c3e5e17b5e3057ac304383a46e3c485d00ffed (patch) | |
tree | ee6142ddd72d3cc143db9f8f594d13b2d7e66012 /drivers/md/raid5.c | |
parent | ef67744e7a4c82e246cd9831208d07249c519d22 (diff) | |
download | linux-83c3e5e17b5e3057ac304383a46e3c485d00ffed.tar.xz |
md/raid5: use do_div() for 64 bit divisions in raid5_sync_request
We get compilation error on 32-bit architectures (e.g. m68k), as:
ERROR: modpost: "__udivdi3" [drivers/md/raid456.ko] undefined!
Since 'sync_blocks' is defined as u64, use do_div() to fix this error.
Fixes: c911c46c017c ("md/raid456: convert macro STRIPE_* to RAID5_STRIPE_*")
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 40961dd1777b..a6ff6e1e039b 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -6104,7 +6104,7 @@ static inline sector_t raid5_sync_request(struct mddev *mddev, sector_t sector_n !md_bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) && sync_blocks >= RAID5_STRIPE_SECTORS(conf)) { /* we can skip this block, and probably more */ - sync_blocks /= RAID5_STRIPE_SECTORS(conf); + do_div(sync_blocks, RAID5_STRIPE_SECTORS(conf)); *skipped = 1; /* keep things rounded to whole stripes */ return sync_blocks * RAID5_STRIPE_SECTORS(conf); |