aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/hugetlb.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 9244971b6791..2911a364481e 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -344,7 +344,6 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
344 entry = *src_pte; 344 entry = *src_pte;
345 ptepage = pte_page(entry); 345 ptepage = pte_page(entry);
346 get_page(ptepage); 346 get_page(ptepage);
347 add_mm_counter(dst, file_rss, HPAGE_SIZE / PAGE_SIZE);
348 set_huge_pte_at(dst, addr, dst_pte, entry); 347 set_huge_pte_at(dst, addr, dst_pte, entry);
349 } 348 }
350 spin_unlock(&src->page_table_lock); 349 spin_unlock(&src->page_table_lock);
@@ -377,10 +376,6 @@ void __unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,
377 BUG_ON(end & ~HPAGE_MASK); 376 BUG_ON(end & ~HPAGE_MASK);
378 377
379 spin_lock(&mm->page_table_lock); 378 spin_lock(&mm->page_table_lock);
380
381 /* Update high watermark before we lower rss */
382 update_hiwater_rss(mm);
383
384 for (address = start; address < end; address += HPAGE_SIZE) { 379 for (address = start; address < end; address += HPAGE_SIZE) {
385 ptep = huge_pte_offset(mm, address); 380 ptep = huge_pte_offset(mm, address);
386 if (!ptep) 381 if (!ptep)
@@ -395,9 +390,7 @@ void __unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,
395 390
396 page = pte_page(pte); 391 page = pte_page(pte);
397 list_add(&page->lru, &page_list); 392 list_add(&page->lru, &page_list);
398 add_mm_counter(mm, file_rss, (int) -(HPAGE_SIZE / PAGE_SIZE));
399 } 393 }
400
401 spin_unlock(&mm->page_table_lock); 394 spin_unlock(&mm->page_table_lock);
402 flush_tlb_range(vma, start, end); 395 flush_tlb_range(vma, start, end);
403 list_for_each_entry_safe(page, tmp, &page_list, lru) { 396 list_for_each_entry_safe(page, tmp, &page_list, lru) {
@@ -523,7 +516,6 @@ retry:
523 if (!pte_none(*ptep)) 516 if (!pte_none(*ptep))
524 goto backout; 517 goto backout;
525 518
526 add_mm_counter(mm, file_rss, HPAGE_SIZE / PAGE_SIZE);
527 new_pte = make_huge_pte(vma, page, ((vma->vm_flags & VM_WRITE) 519 new_pte = make_huge_pte(vma, page, ((vma->vm_flags & VM_WRITE)
528 && (vma->vm_flags & VM_SHARED))); 520 && (vma->vm_flags & VM_SHARED)));
529 set_huge_pte_at(mm, address, ptep, new_pte); 521 set_huge_pte_at(mm, address, ptep, new_pte);