diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/rmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -667,7 +667,8 @@ void page_remove_rmap(struct page *page, struct vm_area_struct *vma) | |||
667 | * Leaving it set also helps swapoff to reinstate ptes | 667 | * Leaving it set also helps swapoff to reinstate ptes |
668 | * faster for those pages still in swapcache. | 668 | * faster for those pages still in swapcache. |
669 | */ | 669 | */ |
670 | if (page_test_dirty(page)) { | 670 | if ((!PageAnon(page) || PageSwapCache(page)) && |
671 | page_test_dirty(page)) { | ||
671 | page_clear_dirty(page); | 672 | page_clear_dirty(page); |
672 | set_page_dirty(page); | 673 | set_page_dirty(page); |
673 | } | 674 | } |