aboutsummaryrefslogtreecommitdiff
path: root/mm/msync.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-29 03:55:47 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-29 03:55:47 -0500
commitb71d4da092801634d04190693a38ca03bdbe2505 (patch)
treee4adc88ade5832b844768c114b15d4d97253c4d0 /mm/msync.c
parent656563e32c3f1dfdc35b3944305ece1c5dfeade5 (diff)
parent624f54be206adf970cd8eece16446b027913e533 (diff)
Merge branch 'master'
Diffstat (limited to 'mm/msync.c')
-rw-r--r--mm/msync.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/mm/msync.c b/mm/msync.c
index 0e040e9c39d..1b5b6f662dc 100644
--- a/mm/msync.c
+++ b/mm/msync.c
@@ -27,7 +27,6 @@ static void msync_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
again:
pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
do {
- unsigned long pfn;
struct page *page;
if (progress >= 64) {
@@ -40,13 +39,9 @@ again:
continue;
if (!pte_maybe_dirty(*pte))
continue;
- pfn = pte_pfn(*pte);
- if (unlikely(!pfn_valid(pfn))) {
- print_bad_pte(vma, *pte, addr);
+ page = vm_normal_page(vma, addr, *pte);
+ if (!page)
continue;
- }
- page = pfn_to_page(pfn);
-
if (ptep_clear_flush_dirty(vma, addr, pte) ||
page_test_and_clear_dirty(page))
set_page_dirty(page);
@@ -97,9 +92,8 @@ static void msync_page_range(struct vm_area_struct *vma,
/* For hugepages we can't go walking the page table normally,
* but that's ok, hugetlbfs is memory based, so we don't need
* to do anything more on an msync().
- * Can't do anything with VM_RESERVED regions either.
*/
- if (vma->vm_flags & (VM_HUGETLB|VM_RESERVED))
+ if (vma->vm_flags & VM_HUGETLB)
return;
BUG_ON(addr >= end);