aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-04-19 16:29:18 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org.(none)>2005-04-19 16:29:18 -0400
commit021740dc30d184e3b0fa7679936e65a56090c425 (patch)
treec31bd23fe74038b4bab5148e17e07745b75b453d /arch/i386
parent146425a316fb937fbdcac018b34a23c67d12214b (diff)
[PATCH] freepgt: hugetlb area is clean
Once we're strict about clearing away page tables, hugetlb_prefault can assume there are no page tables left within its range. Since the other arches continue if !pte_none here, let i386 do the same. 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 'arch/i386')
-rw-r--r--arch/i386/mm/hugetlbpage.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c
index a8c45143088..171fc925e1e 100644
--- a/arch/i386/mm/hugetlbpage.c
+++ b/arch/i386/mm/hugetlbpage.c
@@ -249,15 +249,8 @@ int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma)
249 goto out; 249 goto out;
250 } 250 }
251 251
252 if (!pte_none(*pte)) { 252 if (!pte_none(*pte))
253 pmd_t *pmd = (pmd_t *) pte; 253 continue;
254
255 page = pmd_page(*pmd);
256 pmd_clear(pmd);
257 mm->nr_ptes--;
258 dec_page_state(nr_page_table_pages);
259 page_cache_release(page);
260 }
261 254
262 idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) 255 idx = ((addr - vma->vm_start) >> HPAGE_SHIFT)
263 + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT)); 256 + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT));