aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2006-06-23 05:03:45 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 10:42:52 -0400
commit668e0d8f1a02fd75f1c1e8142a6b08455914242c (patch)
tree51fafed7f9260fb969953a89280c77b69a416e84 /mm
parent185606fc6a120dbebffa6d06a559c20ec2b20034 (diff)
[PATCH] fix update_mmu_cache in fremap.c
There are two calls to update_mmu_cache in fremap.c, both defective. The one in install_page needs to be accompanied by lazy_mmu_prot_update (some other cleanup time, move that into ia64 update_mmu_cache itself); and the one in install_file_pte should be removed since the pte is not present. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/fremap.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mm/fremap.c b/mm/fremap.c
index 9f381e58bf44..21b7d0cbc98c 100644
--- a/mm/fremap.c
+++ b/mm/fremap.c
@@ -83,6 +83,7 @@ int install_page(struct mm_struct *mm, struct vm_area_struct *vma,
83 page_add_file_rmap(page); 83 page_add_file_rmap(page);
84 pte_val = *pte; 84 pte_val = *pte;
85 update_mmu_cache(vma, addr, pte_val); 85 update_mmu_cache(vma, addr, pte_val);
86 lazy_mmu_prot_update(pte_val);
86 err = 0; 87 err = 0;
87unlock: 88unlock:
88 pte_unmap_unlock(pte, ptl); 89 pte_unmap_unlock(pte, ptl);
@@ -114,7 +115,13 @@ int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma,
114 115
115 set_pte_at(mm, addr, pte, pgoff_to_pte(pgoff)); 116 set_pte_at(mm, addr, pte, pgoff_to_pte(pgoff));
116 pte_val = *pte; 117 pte_val = *pte;
117 update_mmu_cache(vma, addr, pte_val); 118 /*
119 * We don't need to run update_mmu_cache() here because the "file pte"
120 * being installed by install_file_pte() is not a real pte - it's a
121 * non-present entry (like a swap entry), noting what file offset should
122 * be mapped there when there's a fault (in a non-linear vma where
123 * that's not obvious).
124 */
118 pte_unmap_unlock(pte, ptl); 125 pte_unmap_unlock(pte, ptl);
119 err = 0; 126 err = 0;
120out: 127out: