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>
This commit is contained in:

committed by
Linus Torvalds

parent
6819457d2c
commit
d688abf50b
@@ -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;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user