diff options
| author | Steve French <sfrench@us.ibm.com> | 2005-11-29 20:56:07 -0800 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2005-11-29 20:56:07 -0800 |
| commit | 606c0dafbe88102d64c1253caed8a2c36987070f (patch) | |
| tree | 23ce7b30341e71c6da8e0183d27e29167e833e26 /mm/msync.c | |
| parent | 6ab16d249513a50bef3f1b275cea6aa8d3f51832 (diff) | |
| parent | d2ef5ebb4c4fe141a82252d4db8d8521e6765c5a (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'mm/msync.c')
| -rw-r--r-- | mm/msync.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/mm/msync.c b/mm/msync.c index b3f4caf3010b..1b5b6f662dcf 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_UNPAGED regions either. */ - if (vma->vm_flags & (VM_HUGETLB|VM_UNPAGED)) + if (vma->vm_flags & VM_HUGETLB) return; BUG_ON(addr >= end); |
