diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page-writeback.c | 1 | ||||
-rw-r--r-- | mm/truncate.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index ea9da3bed3e9..886ea0d5a136 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -824,6 +824,7 @@ int __set_page_dirty_nobuffers(struct page *page) | |||
824 | mapping2 = page_mapping(page); | 824 | mapping2 = page_mapping(page); |
825 | if (mapping2) { /* Race with truncate? */ | 825 | if (mapping2) { /* Race with truncate? */ |
826 | BUG_ON(mapping2 != mapping); | 826 | BUG_ON(mapping2 != mapping); |
827 | WARN_ON_ONCE(!PagePrivate(page) && !PageUptodate(page)); | ||
827 | if (mapping_cap_account_dirty(mapping)) { | 828 | if (mapping_cap_account_dirty(mapping)) { |
828 | __inc_zone_page_state(page, NR_FILE_DIRTY); | 829 | __inc_zone_page_state(page, NR_FILE_DIRTY); |
829 | task_io_account_write(PAGE_CACHE_SIZE); | 830 | task_io_account_write(PAGE_CACHE_SIZE); |
diff --git a/mm/truncate.c b/mm/truncate.c index 7c994f2d6145..f47e46d1be3b 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -100,9 +100,9 @@ truncate_complete_page(struct address_space *mapping, struct page *page) | |||
100 | if (PagePrivate(page)) | 100 | if (PagePrivate(page)) |
101 | do_invalidatepage(page, 0); | 101 | do_invalidatepage(page, 0); |
102 | 102 | ||
103 | remove_from_page_cache(page); | ||
103 | ClearPageUptodate(page); | 104 | ClearPageUptodate(page); |
104 | ClearPageMappedToDisk(page); | 105 | ClearPageMappedToDisk(page); |
105 | remove_from_page_cache(page); | ||
106 | page_cache_release(page); /* pagecache ref */ | 106 | page_cache_release(page); /* pagecache ref */ |
107 | } | 107 | } |
108 | 108 | ||