diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2014-10-29 17:50:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-29 19:33:14 -0400 |
commit | 3a3c02ecf7f2852f122d6d16fb9b3d9cb0c6f201 (patch) | |
tree | 8732d153f0080136fe9ffa155df6c75a8343762b /mm | |
parent | ea5d05b34aca25c066e0699512d0ffbd8ee6ac3e (diff) |
mm: page-writeback: inline account_page_dirtied() into single caller
A follow-up patch would have changed the call signature. To save the
trouble, just fold it instead.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Vladimir Davydov <vdavydov@parallels.com>
Cc: <stable@vger.kernel.org> [3.17.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page-writeback.c | 23 |
1 files changed, 4 insertions, 19 deletions
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 | ||