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 5daf5568b9e1..eb59f7eea508 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -580,7 +580,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,
580 long x; 580 long x;
581 581
582 x = div64_s64(((s64)setpoint - (s64)dirty) << RATELIMIT_CALC_SHIFT, 582 x = div64_s64(((s64)setpoint - (s64)dirty) << RATELIMIT_CALC_SHIFT,
583 limit - setpoint + 1); 583 (limit - setpoint) | 1);
584 pos_ratio = x; 584 pos_ratio = x;
585 pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT; 585 pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT;
586 pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT; 586 pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT;
@@ -807,7 +807,7 @@ static unsigned long bdi_position_ratio(struct backing_dev_info *bdi,
807 * scale global setpoint to bdi's: 807 * scale global setpoint to bdi's:
808 * bdi_setpoint = setpoint * bdi_thresh / thresh 808 * bdi_setpoint = setpoint * bdi_thresh / thresh
809 */ 809 */
810 x = div_u64((u64)bdi_thresh << 16, thresh + 1); 810 x = div_u64((u64)bdi_thresh << 16, thresh | 1);
811 bdi_setpoint = setpoint * (u64)x >> 16; 811 bdi_setpoint = setpoint * (u64)x >> 16;
812 /* 812 /*
813 * Use span=(8*write_bw) in single bdi case as indicated by 813 * Use span=(8*write_bw) in single bdi case as indicated by
@@ -822,7 +822,7 @@ static unsigned long bdi_position_ratio(struct backing_dev_info *bdi,
822 822
823 if (bdi_dirty < x_intercept - span / 4) { 823 if (bdi_dirty < x_intercept - span / 4) {
824 pos_ratio = div64_u64(pos_ratio * (x_intercept - bdi_dirty), 824 pos_ratio = div64_u64(pos_ratio * (x_intercept - bdi_dirty),
825 x_intercept - bdi_setpoint + 1); 825 (x_intercept - bdi_setpoint) | 1);
826 } else 826 } else
827 pos_ratio /= 4; 827 pos_ratio /= 4;
828 828