diff options
-rw-r--r-- | include/linux/mm.h | 1 | ||||
-rw-r--r-- | mm/page-writeback.c | 23 |
2 files changed, 4 insertions, 20 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 27eb1bfbe704..b46461116cd2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1235,7 +1235,6 @@ int __set_page_dirty_no_writeback(struct page *page); | |||
1235 | int redirty_page_for_writepage(struct writeback_control *wbc, | 1235 | int redirty_page_for_writepage(struct writeback_control *wbc, |
1236 | struct page *page); | 1236 | struct page *page); |
1237 | void account_page_dirtied(struct page *page, struct address_space *mapping); | 1237 | void account_page_dirtied(struct page *page, struct address_space *mapping); |
1238 | void account_page_writeback(struct page *page); | ||
1239 | int set_page_dirty(struct page *page); | 1238 | int set_page_dirty(struct page *page); |
1240 | int set_page_dirty_lock(struct page *page); | 1239 | int set_page_dirty_lock(struct page *page); |
1241 | int clear_page_dirty_for_io(struct page *page); | 1240 | int clear_page_dirty_for_io(struct page *page); |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index ff24c9d83112..ff6a5b07211e 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -2116,23 +2116,6 @@ void account_page_dirtied(struct page *page, struct address_space *mapping) | |||
2116 | EXPORT_SYMBOL(account_page_dirtied); | 2116 | EXPORT_SYMBOL(account_page_dirtied); |
2117 | 2117 | ||
2118 | /* | 2118 | /* |
2119 | * Helper function for set_page_writeback family. | ||
2120 | * | ||
2121 | * The caller must hold mem_cgroup_begin/end_update_page_stat() lock | ||
2122 | * while calling this function. | ||
2123 | * See test_set_page_writeback for example. | ||
2124 | * | ||
2125 | * NOTE: Unlike account_page_dirtied this does not rely on being atomic | ||
2126 | * wrt interrupts. | ||
2127 | */ | ||
2128 | void account_page_writeback(struct page *page) | ||
2129 | { | ||
2130 | mem_cgroup_inc_page_stat(page, MEM_CGROUP_STAT_WRITEBACK); | ||
2131 | inc_zone_page_state(page, NR_WRITEBACK); | ||
2132 | } | ||
2133 | EXPORT_SYMBOL(account_page_writeback); | ||
2134 | |||
2135 | /* | ||
2136 | * For address_spaces which do not use buffers. Just tag the page as dirty in | 2119 | * For address_spaces which do not use buffers. Just tag the page as dirty in |
2137 | * its radix tree. | 2120 | * its radix tree. |
2138 | * | 2121 | * |
@@ -2410,8 +2393,10 @@ int __test_set_page_writeback(struct page *page, bool keep_write) | |||
2410 | } else { | 2393 | } else { |
2411 | ret = TestSetPageWriteback(page); | 2394 | ret = TestSetPageWriteback(page); |
2412 | } | 2395 | } |
2413 | if (!ret) | 2396 | if (!ret) { |
2414 | account_page_writeback(page); | 2397 | mem_cgroup_inc_page_stat(page, MEM_CGROUP_STAT_WRITEBACK); |
2398 | inc_zone_page_state(page, NR_WRITEBACK); | ||
2399 | } | ||
2415 | mem_cgroup_end_update_page_stat(page, &locked, &memcg_flags); | 2400 | mem_cgroup_end_update_page_stat(page, &locked, &memcg_flags); |
2416 | return ret; | 2401 | return ret; |
2417 | 2402 | ||