aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/memory.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 222c13e46130..fd5d4c6dc762 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -574,12 +574,14 @@ static void zap_pte_range(struct mmu_gather *tlb, pmd_t *pmd,
574 addr) != page->index) 574 addr) != page->index)
575 set_pte_at(tlb->mm, addr, pte, 575 set_pte_at(tlb->mm, addr, pte,
576 pgoff_to_pte(page->index)); 576 pgoff_to_pte(page->index));
577 if (pte_dirty(ptent))
578 set_page_dirty(page);
579 if (PageAnon(page)) 577 if (PageAnon(page))
580 dec_mm_counter(tlb->mm, anon_rss); 578 dec_mm_counter(tlb->mm, anon_rss);
581 else if (pte_young(ptent)) 579 else {
582 mark_page_accessed(page); 580 if (pte_dirty(ptent))
581 set_page_dirty(page);
582 if (pte_young(ptent))
583 mark_page_accessed(page);
584 }
583 tlb->freed++; 585 tlb->freed++;
584 page_remove_rmap(page); 586 page_remove_rmap(page);
585 tlb_remove_page(tlb, page); 587 tlb_remove_page(tlb, page);