aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-06 16:54:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-06 17:05:17 -0400
commit4f74d2c8e827af12596f153a564c868bf6dbe3dd (patch)
tree6ef2bafd6c23a4c4a9ef716ea530daea824a7721 /include/linux/mm.h
parent7e027b14d53e9729f823ba8652095d1e309aa8e9 (diff)
vm: remove 'nr_accounted' calculations from the unmap_vmas() interfaces
The VM accounting makes no sense at this level, and half of the callers didn't ever actually use the end result. The only time we want to unaccount the memory is when we actually remove the vma, so do the accounting at that point instead. This simplifies the interfaces (no need to pass down that silly page counter to functions that really don't care), and also makes it much more obvious what is actually going on: we do vm_[un]acct_memory() when adding or removing the vma, not on random page walking. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 0aeded3a2f7c..7d5c37f24c63 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -896,9 +896,8 @@ int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
896 unsigned long size); 896 unsigned long size);
897void zap_page_range(struct vm_area_struct *vma, unsigned long address, 897void zap_page_range(struct vm_area_struct *vma, unsigned long address,
898 unsigned long size, struct zap_details *); 898 unsigned long size, struct zap_details *);
899void unmap_vmas(struct mmu_gather *tlb, 899void unmap_vmas(struct mmu_gather *tlb, struct vm_area_struct *start_vma,
900 struct vm_area_struct *start_vma, unsigned long start_addr, 900 unsigned long start, unsigned long end);
901 unsigned long end_addr, unsigned long *nr_accounted);
902 901
903/** 902/**
904 * mm_walk - callbacks for walk_page_range 903 * mm_walk - callbacks for walk_page_range