diff options
author | Hugh Dickins <hugh@veritas.com> | 2009-02-24 20:51:52 +0000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-25 12:21:42 -0800 |
commit | 0b0a0806b0d8635e046bf533225a25903b1cddce (patch) | |
tree | 245ac39eb1b7c6008a669ab2d68ed174d66bd7bc /drivers/ide/ide.c | |
parent | c15d8a6499d04e5d2cac07f8120f207bb275f60f (diff) |
shmem: fix shared anonymous accounting
Each time I exit Firefox, /proc/meminfo's Committed_AS goes down almost
400 kB: OVERCOMMIT_NEVER would be allowing overcommits it should
prohibit.
Commit fc8744adc870a8d4366908221508bb113d8b72ee "Stop playing silly
games with the VM_ACCOUNT flag" changed shmem_file_setup() to set the
shmem file's VM_ACCOUNT flag according to VM_NORESERVE not being set in
the vma flags; but did so only _after_ the shmem_acct_size(flags, size)
call which is expected to pre-account a shared anonymous object.
It's all clearer if we switch shmem.c over to use VM_NORESERVE
throughout in place of !VM_ACCOUNT.
But I very nearly sent in a patch which mistakenly removed the
accounting from tmpfs files: shmem_get_inode()'s memset was good for not
setting VM_ACCOUNT, but now it needs to set VM_NORESERVE.
Rather than setting that by default, then perhaps clearing it again in
shmem_file_setup(), let's pass it as a flag to shmem_get_inode(): that
allows us to remove the #ifdef CONFIG_SHMEM from shmem_file_setup().
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/ide/ide.c')
0 files changed, 0 insertions, 0 deletions