aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-10-29 21:15:56 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 00:40:37 -0400
commitab50b8ed818016cfecd747d6d4bb9139986bc029 (patch)
tree33c666578c14dccce05b3f7a5538405098eebcc4 /include/linux
parent72866f6f277ec0ddd6df7a3b6ecdcf59a28de115 (diff)
[PATCH] mm: vm_stat_account unshackled
The original vm_stat_account has fallen into disuse, with only one user, and only one user of vm_stat_unaccount. It's easier to keep track if we convert them all to __vm_stat_account, then free it from its __shackles. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index e1649578fb0c..376a466743bc 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -928,26 +928,14 @@ int remap_pfn_range(struct vm_area_struct *, unsigned long,
928 unsigned long, unsigned long, pgprot_t); 928 unsigned long, unsigned long, pgprot_t);
929 929
930#ifdef CONFIG_PROC_FS 930#ifdef CONFIG_PROC_FS
931void __vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); 931void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
932#else 932#else
933static inline void __vm_stat_account(struct mm_struct *mm, 933static inline void vm_stat_account(struct mm_struct *mm,
934 unsigned long flags, struct file *file, long pages) 934 unsigned long flags, struct file *file, long pages)
935{ 935{
936} 936}
937#endif /* CONFIG_PROC_FS */ 937#endif /* CONFIG_PROC_FS */
938 938
939static inline void vm_stat_account(struct vm_area_struct *vma)
940{
941 __vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file,
942 vma_pages(vma));
943}
944
945static inline void vm_stat_unaccount(struct vm_area_struct *vma)
946{
947 __vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file,
948 -vma_pages(vma));
949}
950
951/* update per process rss and vm hiwater data */ 939/* update per process rss and vm hiwater data */
952extern void update_mem_hiwater(struct task_struct *tsk); 940extern void update_mem_hiwater(struct task_struct *tsk);
953 941