diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-28 22:21:44 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-28 22:21:44 +0100 |
commit | de1a2262b006220dae2561a299a6ea128c46f4fe (patch) | |
tree | 0df7b3686f09a77a000fb63a333237facad3482c /mm | |
parent | Merge branch 'for-3.9/drivers' of git://git.kernel.dk/linux-block (diff) | |
parent | Negative (setpoint-dirty) in bdi_position_ratio() (diff) | |
download | linux-de1a2262b006220dae2561a299a6ea128c46f4fe.tar.xz linux-de1a2262b006220dae2561a299a6ea128c46f4fe.zip |
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')
-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, * => fast response on large errors; small oscillation near setpoint */ setpoint = (freerun + limit) / 2; - x = div_s64((setpoint - dirty) << RATELIMIT_CALC_SHIFT, + x = div_s64(((s64)setpoint - (s64)dirty) << RATELIMIT_CALC_SHIFT, limit - setpoint + 1); pos_ratio = x; pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT; |