diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index aee909fc622b9858233ea70ce746ae1bc723494c..68a5a26997bf57caebe9efc3a2d26da4a773c77e 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -2266,7 +2266,7 @@ static int get_raid56_logic_offset(u64 physical, int num, rot = do_div(stripe_nr, map->num_stripes); /* calculate which stripe this data locates */ rot += i; - stripe_index = do_div(rot, map->num_stripes); + stripe_index = rot % map->num_stripes; if (stripe_index == num) return 0; if (stripe_index < num)