aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/truncate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/truncate.c b/mm/truncate.c
index 89a5c359b6e8..4a38dd1a4ce8 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -60,7 +60,8 @@ void cancel_dirty_page(struct page *page, unsigned int account_size)
60 WARN_ON(++warncount < 5); 60 WARN_ON(++warncount < 5);
61 } 61 }
62 62
63 if (TestClearPageDirty(page) && account_size) { 63 if (TestClearPageDirty(page) && account_size &&
64 mapping_cap_account_dirty(page->mapping)) {
64 dec_zone_page_state(page, NR_FILE_DIRTY); 65 dec_zone_page_state(page, NR_FILE_DIRTY);
65 task_io_account_cancelled_write(account_size); 66 task_io_account_cancelled_write(account_size);
66 } 67 }