diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/truncate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/truncate.c b/mm/truncate.c index e07b1e682c38..9bfb8e853860 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
15 | #include <linux/pagevec.h> | 15 | #include <linux/pagevec.h> |
16 | #include <linux/task_io_accounting_ops.h> | ||
16 | #include <linux/buffer_head.h> /* grr. try_to_release_page, | 17 | #include <linux/buffer_head.h> /* grr. try_to_release_page, |
17 | do_invalidatepage */ | 18 | do_invalidatepage */ |
18 | 19 | ||
@@ -69,7 +70,8 @@ truncate_complete_page(struct address_space *mapping, struct page *page) | |||
69 | if (PagePrivate(page)) | 70 | if (PagePrivate(page)) |
70 | do_invalidatepage(page, 0); | 71 | do_invalidatepage(page, 0); |
71 | 72 | ||
72 | clear_page_dirty(page); | 73 | if (test_clear_page_dirty(page)) |
74 | task_io_account_cancelled_write(PAGE_CACHE_SIZE); | ||
73 | ClearPageUptodate(page); | 75 | ClearPageUptodate(page); |
74 | ClearPageMappedToDisk(page); | 76 | ClearPageMappedToDisk(page); |
75 | remove_from_page_cache(page); | 77 | remove_from_page_cache(page); |