[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>
This commit is contained in:

committed by
Linus Torvalds

parent
72866f6f27
commit
ab50b8ed81
@@ -928,26 +928,14 @@ int remap_pfn_range(struct vm_area_struct *, unsigned long,
|
||||
unsigned long, unsigned long, pgprot_t);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
void __vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
|
||||
void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
|
||||
#else
|
||||
static inline void __vm_stat_account(struct mm_struct *mm,
|
||||
static inline void vm_stat_account(struct mm_struct *mm,
|
||||
unsigned long flags, struct file *file, long pages)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
|
||||
static inline void vm_stat_account(struct vm_area_struct *vma)
|
||||
{
|
||||
__vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file,
|
||||
vma_pages(vma));
|
||||
}
|
||||
|
||||
static inline void vm_stat_unaccount(struct vm_area_struct *vma)
|
||||
{
|
||||
__vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file,
|
||||
-vma_pages(vma));
|
||||
}
|
||||
|
||||
/* update per process rss and vm hiwater data */
|
||||
extern void update_mem_hiwater(struct task_struct *tsk);
|
||||
|
||||
|
Reference in New Issue
Block a user