diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page-writeback.c | 4 | ||||
-rw-r--r-- | mm/truncate.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index d821321326e3..9b3c4ee62abf 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -827,6 +827,8 @@ int __set_page_dirty_nobuffers(struct page *page) | |||
827 | WARN_ON_ONCE(!PagePrivate(page) && !PageUptodate(page)); | 827 | WARN_ON_ONCE(!PagePrivate(page) && !PageUptodate(page)); |
828 | if (mapping_cap_account_dirty(mapping)) { | 828 | if (mapping_cap_account_dirty(mapping)) { |
829 | __inc_zone_page_state(page, NR_FILE_DIRTY); | 829 | __inc_zone_page_state(page, NR_FILE_DIRTY); |
830 | __inc_bdi_stat(mapping->backing_dev_info, | ||
831 | BDI_RECLAIMABLE); | ||
830 | task_io_account_write(PAGE_CACHE_SIZE); | 832 | task_io_account_write(PAGE_CACHE_SIZE); |
831 | } | 833 | } |
832 | radix_tree_tag_set(&mapping->page_tree, | 834 | radix_tree_tag_set(&mapping->page_tree, |
@@ -961,6 +963,8 @@ int clear_page_dirty_for_io(struct page *page) | |||
961 | */ | 963 | */ |
962 | if (TestClearPageDirty(page)) { | 964 | if (TestClearPageDirty(page)) { |
963 | dec_zone_page_state(page, NR_FILE_DIRTY); | 965 | dec_zone_page_state(page, NR_FILE_DIRTY); |
966 | dec_bdi_stat(mapping->backing_dev_info, | ||
967 | BDI_RECLAIMABLE); | ||
964 | return 1; | 968 | return 1; |
965 | } | 969 | } |
966 | return 0; | 970 | return 0; |
diff --git a/mm/truncate.c b/mm/truncate.c index 5cdfbc1a59fd..ff78505453d4 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -72,6 +72,8 @@ void cancel_dirty_page(struct page *page, unsigned int account_size) | |||
72 | struct address_space *mapping = page->mapping; | 72 | struct address_space *mapping = page->mapping; |
73 | if (mapping && mapping_cap_account_dirty(mapping)) { | 73 | if (mapping && mapping_cap_account_dirty(mapping)) { |
74 | dec_zone_page_state(page, NR_FILE_DIRTY); | 74 | dec_zone_page_state(page, NR_FILE_DIRTY); |
75 | dec_bdi_stat(mapping->backing_dev_info, | ||
76 | BDI_RECLAIMABLE); | ||
75 | if (account_size) | 77 | if (account_size) |
76 | task_io_account_cancelled_write(account_size); | 78 | task_io_account_cancelled_write(account_size); |
77 | } | 79 | } |