diff options
Diffstat (limited to 'mm/rmap.c')
-rw-r--r-- | mm/rmap.c | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -576,14 +576,8 @@ void page_add_anon_rmap(struct page *page, | |||
576 | VM_BUG_ON(address < vma->vm_start || address >= vma->vm_end); | 576 | VM_BUG_ON(address < vma->vm_start || address >= vma->vm_end); |
577 | if (atomic_inc_and_test(&page->_mapcount)) | 577 | if (atomic_inc_and_test(&page->_mapcount)) |
578 | __page_set_anon_rmap(page, vma, address); | 578 | __page_set_anon_rmap(page, vma, address); |
579 | else { | 579 | else |
580 | __page_check_anon_rmap(page, vma, address); | 580 | __page_check_anon_rmap(page, vma, address); |
581 | /* | ||
582 | * We unconditionally charged during prepare, we uncharge here | ||
583 | * This takes care of balancing the reference counts | ||
584 | */ | ||
585 | mem_cgroup_uncharge_page(page); | ||
586 | } | ||
587 | } | 581 | } |
588 | 582 | ||
589 | /** | 583 | /** |
@@ -614,12 +608,6 @@ void page_add_file_rmap(struct page *page) | |||
614 | { | 608 | { |
615 | if (atomic_inc_and_test(&page->_mapcount)) | 609 | if (atomic_inc_and_test(&page->_mapcount)) |
616 | __inc_zone_page_state(page, NR_FILE_MAPPED); | 610 | __inc_zone_page_state(page, NR_FILE_MAPPED); |
617 | else | ||
618 | /* | ||
619 | * We unconditionally charged during prepare, we uncharge here | ||
620 | * This takes care of balancing the reference counts | ||
621 | */ | ||
622 | mem_cgroup_uncharge_page(page); | ||
623 | } | 611 | } |
624 | 612 | ||
625 | #ifdef CONFIG_DEBUG_VM | 613 | #ifdef CONFIG_DEBUG_VM |