Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5673
b: refs/heads/master
c: c7546f8
h: refs/heads/master
i:
  5671: 44634c5
v: v3
  • Loading branch information
David Gibson authored and Linus Torvalds committed Aug 5, 2005
1 parent 292b4b5 commit ca6b51d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: e6cb99413da42af413c11a394538ddc8b9d201e1
refs/heads/master: c7546f8f03f5a4fa612605b6be930234d6026860
11 changes: 10 additions & 1 deletion trunk/mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,
{
struct mm_struct *mm = vma->vm_mm;
unsigned long address;
pte_t *ptep;
pte_t pte;
struct page *page;

Expand All @@ -309,9 +310,17 @@ void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,
BUG_ON(end & ~HPAGE_MASK);

for (address = start; address < end; address += HPAGE_SIZE) {
pte = huge_ptep_get_and_clear(mm, address, huge_pte_offset(mm, address));
ptep = huge_pte_offset(mm, address);
if (! ptep)
/* This can happen on truncate, or if an
* mmap() is aborted due to an error before
* the prefault */
continue;

pte = huge_ptep_get_and_clear(mm, address, ptep);
if (pte_none(pte))
continue;

page = pte_page(pte);
put_page(page);
}
Expand Down

0 comments on commit ca6b51d

Please sign in to comment.