aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/math.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/math.h')
-rw-r--r--fs/btrfs/math.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/math.h b/fs/btrfs/math.h
index b7816cefbd13..1b10a3cd1195 100644
--- a/fs/btrfs/math.h
+++ b/fs/btrfs/math.h
@@ -28,8 +28,7 @@ static inline u64 div_factor(u64 num, int factor)
28 if (factor == 10) 28 if (factor == 10)
29 return num; 29 return num;
30 num *= factor; 30 num *= factor;
31 do_div(num, 10); 31 return div_u64(num, 10);
32 return num;
33} 32}
34 33
35static inline u64 div_factor_fine(u64 num, int factor) 34static inline u64 div_factor_fine(u64 num, int factor)
@@ -37,8 +36,7 @@ static inline u64 div_factor_fine(u64 num, int factor)
37 if (factor == 100) 36 if (factor == 100)
38 return num; 37 return num;
39 num *= factor; 38 num *= factor;
40 do_div(num, 100); 39 return div_u64(num, 100);
41 return num;
42} 40}
43 41
44#endif 42#endif