Merge tag 'for-linus-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayto...
[muen/linux.git] / mm / page-writeback.c
index db30ce0b7d80c18a06a7994a89725994485e55c3..0b60cc7ddac2b1a63ce71ed17c02a64cb6370e1c 100644 (file)
@@ -2432,8 +2432,7 @@ void account_page_dirtied(struct page *page, struct address_space *mapping)
                inode_attach_wb(inode, page);
                wb = inode_to_wb(inode);
 
-               inc_memcg_page_state(page, NR_FILE_DIRTY);
-               __inc_node_page_state(page, NR_FILE_DIRTY);
+               __inc_lruvec_page_state(page, NR_FILE_DIRTY);
                __inc_zone_page_state(page, NR_ZONE_WRITE_PENDING);
                __inc_node_page_state(page, NR_DIRTIED);
                __inc_wb_stat(wb, WB_RECLAIMABLE);
@@ -2454,8 +2453,7 @@ void account_page_cleaned(struct page *page, struct address_space *mapping,
                          struct bdi_writeback *wb)
 {
        if (mapping_cap_account_dirty(mapping)) {
-               dec_memcg_page_state(page, NR_FILE_DIRTY);
-               dec_node_page_state(page, NR_FILE_DIRTY);
+               dec_lruvec_page_state(page, NR_FILE_DIRTY);
                dec_zone_page_state(page, NR_ZONE_WRITE_PENDING);
                dec_wb_stat(wb, WB_RECLAIMABLE);
                task_io_account_cancelled_write(PAGE_SIZE);
@@ -2711,8 +2709,7 @@ int clear_page_dirty_for_io(struct page *page)
                 */
                wb = unlocked_inode_to_wb_begin(inode, &locked);
                if (TestClearPageDirty(page)) {
-                       dec_memcg_page_state(page, NR_FILE_DIRTY);
-                       dec_node_page_state(page, NR_FILE_DIRTY);
+                       dec_lruvec_page_state(page, NR_FILE_DIRTY);
                        dec_zone_page_state(page, NR_ZONE_WRITE_PENDING);
                        dec_wb_stat(wb, WB_RECLAIMABLE);
                        ret = 1;
@@ -2758,8 +2755,7 @@ int test_clear_page_writeback(struct page *page)
                ret = TestClearPageWriteback(page);
        }
        if (ret) {
-               dec_memcg_page_state(page, NR_WRITEBACK);
-               dec_node_page_state(page, NR_WRITEBACK);
+               dec_lruvec_page_state(page, NR_WRITEBACK);
                dec_zone_page_state(page, NR_ZONE_WRITE_PENDING);
                inc_node_page_state(page, NR_WRITTEN);
        }
@@ -2813,8 +2809,7 @@ int __test_set_page_writeback(struct page *page, bool keep_write)
                ret = TestSetPageWriteback(page);
        }
        if (!ret) {
-               inc_memcg_page_state(page, NR_WRITEBACK);
-               inc_node_page_state(page, NR_WRITEBACK);
+               inc_lruvec_page_state(page, NR_WRITEBACK);
                inc_zone_page_state(page, NR_ZONE_WRITE_PENDING);
        }
        unlock_page_memcg(page);