aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/mm/memory.c b/mm/memory.c
index ef09f0acb1d8..072c1135ad37 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -678,7 +678,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
678 if (pte_dirty(ptent)) 678 if (pte_dirty(ptent))
679 set_page_dirty(page); 679 set_page_dirty(page);
680 if (pte_young(ptent)) 680 if (pte_young(ptent))
681 mark_page_accessed(page); 681 SetPageReferenced(page);
682 file_rss--; 682 file_rss--;
683 } 683 }
684 page_remove_rmap(page, vma); 684 page_remove_rmap(page, vma);
@@ -1531,8 +1531,6 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
1531 if (vma->vm_ops->page_mkwrite(vma, old_page) < 0) 1531 if (vma->vm_ops->page_mkwrite(vma, old_page) < 0)
1532 goto unwritable_page; 1532 goto unwritable_page;
1533 1533
1534 page_cache_release(old_page);
1535
1536 /* 1534 /*
1537 * Since we dropped the lock we need to revalidate 1535 * Since we dropped the lock we need to revalidate
1538 * the PTE as someone else may have changed it. If 1536 * the PTE as someone else may have changed it. If
@@ -1541,6 +1539,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
1541 */ 1539 */
1542 page_table = pte_offset_map_lock(mm, pmd, address, 1540 page_table = pte_offset_map_lock(mm, pmd, address,
1543 &ptl); 1541 &ptl);
1542 page_cache_release(old_page);
1544 if (!pte_same(*page_table, orig_pte)) 1543 if (!pte_same(*page_table, orig_pte))
1545 goto unlock; 1544 goto unlock;
1546 } 1545 }
@@ -1776,9 +1775,7 @@ restart:
1776} 1775}
1777 1776
1778/** 1777/**
1779 * unmap_mapping_range - unmap the portion of all mmaps 1778 * unmap_mapping_range - unmap the portion of all mmaps in the specified address_space corresponding to the specified page range in the underlying file.
1780 * in the specified address_space corresponding to the specified
1781 * page range in the underlying file.
1782 * @mapping: the address space containing mmaps to be unmapped. 1779 * @mapping: the address space containing mmaps to be unmapped.
1783 * @holebegin: byte in first page to unmap, relative to the start of 1780 * @holebegin: byte in first page to unmap, relative to the start of
1784 * the underlying file. This will be rounded down to a PAGE_SIZE 1781 * the underlying file. This will be rounded down to a PAGE_SIZE