[PATCH 18/47] writeback: move BDI_WRITTEN accounting into __bdi_writeout_inc()

Wu Fengguang
2010-12-13T06:51:34Z

[-- Attachment #1: writeback-bdi-written-fix.patch --]
[-- Type: text/plain, Size: 931 bytes --]

This will cover and fix fuse, which only calls bdi_writeout_inc(). -Peter

CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
mm/page-writeback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next.orig/mm/page-writeback.c 2010-12-08 22:44:27.000000000 +0800
+++ linux-next/mm/page-writeback.c 2010-12-08 22:44:27.000000000 +0800
@@ -199,6 +199,7 @@ int dirty_bytes_handler(struct ctl_table
*/
static inline void __bdi_writeout_inc(struct backing_dev_info *bdi)
{
+ __inc_bdi_stat(bdi, BDI_WRITTEN);
__prop_inc_percpu_max(&vm_completions, &bdi->completions,
bdi->max_prop_frac);
}
@@ -1411,7 +1412,6 @@ int test_clear_page_writeback(struct pag
PAGECACHE_TAG_WRITEBACK);
if (bdi_cap_account_writeback(bdi)) {
__dec_bdi_stat(bdi, BDI_WRITEBACK);
- __inc_bdi_stat(bdi, BDI_WRITTEN);
__bdi_writeout_inc(bdi);
}
}