diff options
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r-- | fs/btrfs/scrub.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 293262163daf..c21581e0be7a 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c | |||
@@ -2328,7 +2328,7 @@ static inline void __scrub_mark_bitmap(struct scrub_parity *sparity, | |||
2328 | } | 2328 | } |
2329 | 2329 | ||
2330 | start -= sparity->logic_start; | 2330 | start -= sparity->logic_start; |
2331 | offset = (int)do_div(start, sparity->stripe_len); | 2331 | start = div_u64_rem(start, sparity->stripe_len, &offset); |
2332 | offset /= sectorsize; | 2332 | offset /= sectorsize; |
2333 | nsectors = (int)len / sectorsize; | 2333 | nsectors = (int)len / sectorsize; |
2334 | 2334 | ||
@@ -2627,7 +2627,7 @@ static int get_raid56_logic_offset(u64 physical, int num, | |||
2627 | stripe_nr = div_u64(stripe_nr, nr_data_stripes(map)); | 2627 | stripe_nr = div_u64(stripe_nr, nr_data_stripes(map)); |
2628 | 2628 | ||
2629 | /* Work out the disk rotation on this stripe-set */ | 2629 | /* Work out the disk rotation on this stripe-set */ |
2630 | rot = do_div(stripe_nr, map->num_stripes); | 2630 | stripe_nr = div_u64_rem(stripe_nr, map->num_stripes, &rot); |
2631 | /* calculate which stripe this data locates */ | 2631 | /* calculate which stripe this data locates */ |
2632 | rot += i; | 2632 | rot += i; |
2633 | stripe_index = rot % map->num_stripes; | 2633 | stripe_index = rot % map->num_stripes; |