diff options
author | Andrew Morton <akpm@osdl.org> | 2007-07-19 01:49:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 10:04:52 -0700 |
commit | d688abf50bd5a30d2c44dea2a72dd59052cd3cce (patch) | |
tree | 2f572d18af05969b2c882970cda4860be345bdfc /mm/page-writeback.c | |
parent | 6819457d2cb7fe4fdb0fc3655b6b6dc71a86bee9 (diff) | |
download | lwn-d688abf50bd5a30d2c44dea2a72dd59052cd3cce.tar.gz lwn-d688abf50bd5a30d2c44dea2a72dd59052cd3cce.zip |
move page writeback acounting out of macros
page-writeback accounting is presently performed in the page-flags macros.
This is inconsistent and a bit ugly and makes it awkward to implement
per-backing_dev under-writeback page accounting.
So move this accounting down to the callsite(s).
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r-- | mm/page-writeback.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 51b3eb6ab445..63512a9ed57e 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -987,6 +987,8 @@ int test_clear_page_writeback(struct page *page) } else { ret = TestClearPageWriteback(page); } + if (ret) + dec_zone_page_state(page, NR_WRITEBACK); return ret; } @@ -1012,6 +1014,8 @@ int test_set_page_writeback(struct page *page) } else { ret = TestSetPageWriteback(page); } + if (!ret) + inc_zone_page_state(page, NR_WRITEBACK); return ret; } |