diff options
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r-- | mm/page-writeback.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index e3bccac1f025..94159819a651 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -1129,6 +1129,17 @@ void account_page_dirtied(struct page *page, struct address_space *mapping) | |||
1129 | EXPORT_SYMBOL(account_page_dirtied); | 1129 | EXPORT_SYMBOL(account_page_dirtied); |
1130 | 1130 | ||
1131 | /* | 1131 | /* |
1132 | * Helper function for set_page_writeback family. | ||
1133 | * NOTE: Unlike account_page_dirtied this does not rely on being atomic | ||
1134 | * wrt interrupts. | ||
1135 | */ | ||
1136 | void account_page_writeback(struct page *page) | ||
1137 | { | ||
1138 | inc_zone_page_state(page, NR_WRITEBACK); | ||
1139 | } | ||
1140 | EXPORT_SYMBOL(account_page_writeback); | ||
1141 | |||
1142 | /* | ||
1132 | * For address_spaces which do not use buffers. Just tag the page as dirty in | 1143 | * For address_spaces which do not use buffers. Just tag the page as dirty in |
1133 | * its radix tree. | 1144 | * its radix tree. |
1134 | * | 1145 | * |
@@ -1366,7 +1377,7 @@ int test_set_page_writeback(struct page *page) | |||
1366 | ret = TestSetPageWriteback(page); | 1377 | ret = TestSetPageWriteback(page); |
1367 | } | 1378 | } |
1368 | if (!ret) | 1379 | if (!ret) |
1369 | inc_zone_page_state(page, NR_WRITEBACK); | 1380 | account_page_writeback(page); |
1370 | return ret; | 1381 | return ret; |
1371 | 1382 | ||
1372 | } | 1383 | } |