]> git.baikalelectronics.ru Git - kernel.git/commit
vm: remove 'nr_accounted' calculations from the unmap_vmas() interfaces
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 6 May 2012 20:54:06 +0000 (13:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 6 May 2012 21:05:17 +0000 (14:05 -0700)
commit025d9e8c8958d4d41c1d33b85416aebde8af443a
tree6ef2bafd6c23a4c4a9ef716ea530daea824a7721
parent7d192c5a80e7805fd5aa2dcdbcb1ade92bc6a919
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>
include/linux/mm.h
mm/memory.c
mm/mmap.c