aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r--mm/page-writeback.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index ef413492a149..a4317da60532 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -593,14 +593,14 @@ unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, unsigned long dirty)
593 * (5) the closer to setpoint, the smaller |df/dx| (and the reverse) 593 * (5) the closer to setpoint, the smaller |df/dx| (and the reverse)
594 * => fast response on large errors; small oscillation near setpoint 594 * => fast response on large errors; small oscillation near setpoint
595 */ 595 */
596static inline long long pos_ratio_polynom(unsigned long setpoint, 596static long long pos_ratio_polynom(unsigned long setpoint,
597 unsigned long dirty, 597 unsigned long dirty,
598 unsigned long limit) 598 unsigned long limit)
599{ 599{
600 long long pos_ratio; 600 long long pos_ratio;
601 long x; 601 long x;
602 602
603 x = div_s64(((s64)setpoint - (s64)dirty) << RATELIMIT_CALC_SHIFT, 603 x = div64_s64(((s64)setpoint - (s64)dirty) << RATELIMIT_CALC_SHIFT,
604 limit - setpoint + 1); 604 limit - setpoint + 1);
605 pos_ratio = x; 605 pos_ratio = x;
606 pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT; 606 pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT;
@@ -842,7 +842,7 @@ static unsigned long bdi_position_ratio(struct backing_dev_info *bdi,
842 x_intercept = bdi_setpoint + span; 842 x_intercept = bdi_setpoint + span;
843 843
844 if (bdi_dirty < x_intercept - span / 4) { 844 if (bdi_dirty < x_intercept - span / 4) {
845 pos_ratio = div_u64(pos_ratio * (x_intercept - bdi_dirty), 845 pos_ratio = div64_u64(pos_ratio * (x_intercept - bdi_dirty),
846 x_intercept - bdi_setpoint + 1); 846 x_intercept - bdi_setpoint + 1);
847 } else 847 } else
848 pos_ratio /= 4; 848 pos_ratio /= 4;