]> err.no Git - linux-2.6/commitdiff
[PATCH] Fix missing pfn variables caused by vm changes
authorBen Collins <bcollins@debian.org>
Tue, 29 Nov 2005 19:45:26 +0000 (11:45 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 29 Nov 2005 20:57:17 +0000 (12:57 -0800)
I image this showed up because of "unused var..." when the changes
occured, because flush_cache_page() is a noop in most places.  This
showed up for me on parisc however, where flush_cache_page() is a real
function.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/memory.c
mm/rmap.c

index 6c1eac92a316325c087b2da3e9ee9502495bddc7..74839b3a39997ffeabf203d983453f42720dc88a 100644 (file)
@@ -1345,7 +1345,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
                int reuse = can_share_swap_page(old_page);
                unlock_page(old_page);
                if (reuse) {
-                       flush_cache_page(vma, address, pfn);
+                       flush_cache_page(vma, address, pte_pfn(orig_pte));
                        entry = pte_mkyoung(orig_pte);
                        entry = maybe_mkwrite(pte_mkdirty(entry), vma);
                        ptep_set_access_flags(vma, address, page_table, entry, 1);
@@ -1389,7 +1389,7 @@ gotten:
                        }
                } else
                        inc_mm_counter(mm, anon_rss);
-               flush_cache_page(vma, address, pfn);
+               flush_cache_page(vma, address, pte_pfn(orig_pte));
                entry = mk_pte(new_page, vma->vm_page_prot);
                entry = maybe_mkwrite(pte_mkdirty(entry), vma);
                ptep_establish(vma, address, page_table, entry);
index 491ac350048f2546c8aa5c09a2f7356a46e22993..f853c6def15915602e484afdd3a741099d543887 100644 (file)
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -641,7 +641,7 @@ static void try_to_unmap_cluster(unsigned long cursor,
                        continue;
 
                /* Nuke the page table entry. */
-               flush_cache_page(vma, address, pfn);
+               flush_cache_page(vma, address, pte_pfn(*pte));
                pteval = ptep_clear_flush(vma, address, pte);
 
                /* If nonlinear, store the file page offset in the pte. */