Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6875
b: refs/heads/master
c: 7bf07f3
h: refs/heads/master
i:
  6873: 0d3e914
  6871: f23f207
v: v3
  • Loading branch information
Adam Litke authored and Linus Torvalds committed Sep 5, 2005
1 parent f36991c commit 4d0ca8a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 32e51a8c976fc72c3e9bcece9767d9908816bf8e
refs/heads/master: 7bf07f3d4b4358aa6d99a26d7a0165f1e91c3fcc
13 changes: 11 additions & 2 deletions trunk/arch/i386/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,21 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
{
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd = NULL;
pmd_t *pmd;
pte_t *pte = NULL;

pgd = pgd_offset(mm, addr);
pud = pud_alloc(mm, pgd, addr);
pmd = pmd_alloc(mm, pud, addr);
return (pte_t *) pmd;

if (!pmd)
goto out;

pte = (pte_t *) pmd;
if (!pte_none(*pte) && !pte_huge(*pte))
hugetlb_clean_stale_pgtable(pte);
out:
return pte;
}

pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
Expand Down
2 changes: 0 additions & 2 deletions trunk/mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,6 @@ int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma)
ret = -ENOMEM;
goto out;
}
if (! pte_none(*pte))
hugetlb_clean_stale_pgtable(pte);

idx = ((addr - vma->vm_start) >> HPAGE_SHIFT)
+ (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT));
Expand Down

0 comments on commit 4d0ca8a

Please sign in to comment.