diff options
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -832,7 +832,7 @@ none: | |||
832 | } | 832 | } |
833 | 833 | ||
834 | #ifdef CONFIG_PROC_FS | 834 | #ifdef CONFIG_PROC_FS |
835 | void __vm_stat_account(struct mm_struct *mm, unsigned long flags, | 835 | void vm_stat_account(struct mm_struct *mm, unsigned long flags, |
836 | struct file *file, long pages) | 836 | struct file *file, long pages) |
837 | { | 837 | { |
838 | const unsigned long stack_flags | 838 | const unsigned long stack_flags |
@@ -1110,7 +1110,7 @@ munmap_back: | |||
1110 | } | 1110 | } |
1111 | out: | 1111 | out: |
1112 | mm->total_vm += len >> PAGE_SHIFT; | 1112 | mm->total_vm += len >> PAGE_SHIFT; |
1113 | __vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT); | 1113 | vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT); |
1114 | if (vm_flags & VM_LOCKED) { | 1114 | if (vm_flags & VM_LOCKED) { |
1115 | mm->locked_vm += len >> PAGE_SHIFT; | 1115 | mm->locked_vm += len >> PAGE_SHIFT; |
1116 | make_pages_present(addr, addr + len); | 1116 | make_pages_present(addr, addr + len); |
@@ -1475,7 +1475,7 @@ static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, un | |||
1475 | mm->total_vm += grow; | 1475 | mm->total_vm += grow; |
1476 | if (vma->vm_flags & VM_LOCKED) | 1476 | if (vma->vm_flags & VM_LOCKED) |
1477 | mm->locked_vm += grow; | 1477 | mm->locked_vm += grow; |
1478 | __vm_stat_account(mm, vma->vm_flags, vma->vm_file, grow); | 1478 | vm_stat_account(mm, vma->vm_flags, vma->vm_file, grow); |
1479 | return 0; | 1479 | return 0; |
1480 | } | 1480 | } |
1481 | 1481 | ||
@@ -1610,15 +1610,15 @@ find_extend_vma(struct mm_struct * mm, unsigned long addr) | |||
1610 | * By the time this function is called, the area struct has been | 1610 | * By the time this function is called, the area struct has been |
1611 | * removed from the process mapping list. | 1611 | * removed from the process mapping list. |
1612 | */ | 1612 | */ |
1613 | static void unmap_vma(struct mm_struct *mm, struct vm_area_struct *area) | 1613 | static void unmap_vma(struct mm_struct *mm, struct vm_area_struct *vma) |
1614 | { | 1614 | { |
1615 | size_t len = area->vm_end - area->vm_start; | 1615 | long nrpages = vma_pages(vma); |
1616 | 1616 | ||
1617 | area->vm_mm->total_vm -= len >> PAGE_SHIFT; | 1617 | mm->total_vm -= nrpages; |
1618 | if (area->vm_flags & VM_LOCKED) | 1618 | if (vma->vm_flags & VM_LOCKED) |
1619 | area->vm_mm->locked_vm -= len >> PAGE_SHIFT; | 1619 | mm->locked_vm -= nrpages; |
1620 | vm_stat_unaccount(area); | 1620 | vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages); |
1621 | remove_vm_struct(area); | 1621 | remove_vm_struct(vma); |
1622 | } | 1622 | } |
1623 | 1623 | ||
1624 | /* | 1624 | /* |