diff options
author | Huang Shijie <shijie8@gmail.com> | 2012-07-31 19:41:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 21:42:39 -0400 |
commit | 44de9d0cad41f2c51ef26916842be046b582dcc9 (patch) | |
tree | a9ce576f28e5038e9e3ae2e360cadf176dc74898 /include/linux/mm.h | |
parent | df858fa8276f85106f2f5c3cd49c1fa524058070 (diff) |
mm: account the total_vm in the vm_stat_account()
vm_stat_account() accounts the shared_vm, stack_vm and reserved_vm now.
But we can also account for total_vm in the vm_stat_account() which makes
the code tidy.
Even for mprotect_fixup(), we can get the right result in the end.
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index f9f279cf5b1b..3955bedeeed1 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1528,6 +1528,7 @@ void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); | |||
1528 | static inline void vm_stat_account(struct mm_struct *mm, | 1528 | static inline void vm_stat_account(struct mm_struct *mm, |
1529 | unsigned long flags, struct file *file, long pages) | 1529 | unsigned long flags, struct file *file, long pages) |
1530 | { | 1530 | { |
1531 | mm->total_vm += pages; | ||
1531 | } | 1532 | } |
1532 | #endif /* CONFIG_PROC_FS */ | 1533 | #endif /* CONFIG_PROC_FS */ |
1533 | 1534 | ||