diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-28 16:21:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-28 16:21:44 -0500 |
commit | de1a2262b006220dae2561a299a6ea128c46f4fe (patch) | |
tree | 0df7b3686f09a77a000fb63a333237facad3482c /mm/page-writeback.c | |
parent | f042fea0da78d9dc077a9c736b33b60eb8f35195 (diff) | |
parent | ed84825b785ceb932af7dd5aa08614801721320b (diff) |
Merge tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux
Pull writeback fixes from Wu Fengguang:
"Two writeback fixes
- fix negative (setpoint - dirty) in 32bit archs
- use down_read_trylock() in writeback_inodes_sb(_nr)_if_idle()"
* tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
Negative (setpoint-dirty) in bdi_position_ratio()
vfs: re-implement writeback_inodes_sb(_nr)_if_idle() and rename them
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r-- | mm/page-writeback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 742c40583159..efe68148f621 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -696,7 +696,7 @@ static unsigned long bdi_position_ratio(struct backing_dev_info *bdi, | |||
696 | * => fast response on large errors; small oscillation near setpoint | 696 | * => fast response on large errors; small oscillation near setpoint |
697 | */ | 697 | */ |
698 | setpoint = (freerun + limit) / 2; | 698 | setpoint = (freerun + limit) / 2; |
699 | x = div_s64((setpoint - dirty) << RATELIMIT_CALC_SHIFT, | 699 | x = div_s64(((s64)setpoint - (s64)dirty) << RATELIMIT_CALC_SHIFT, |
700 | limit - setpoint + 1); | 700 | limit - setpoint + 1); |
701 | pos_ratio = x; | 701 | pos_ratio = x; |
702 | pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT; | 702 | pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT; |