Skip to content
Commit 4f74d2c8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7e027b14
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment