diff options
| -rw-r--r-- | include/linux/mm.h | 8 | ||||
| -rw-r--r-- | mm/mmap.c | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8d61ba9895ab..7a47263511f0 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -752,7 +752,15 @@ extern struct page * follow_page(struct mm_struct *mm, unsigned long address, int write); extern int remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long to, unsigned long size, pgprot_t prot); + +#ifdef CONFIG_PROC_FS void __vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); +#else +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) { diff --git a/mm/mmap.c b/mm/mmap.c index 0857b7ac2f03..cac244415b6c 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -729,6 +729,7 @@ none: return NULL; } +#ifdef CONFIG_PROC_FS void __vm_stat_account(struct mm_struct *mm, unsigned long flags, struct file *file, long pages) { @@ -750,6 +751,7 @@ void __vm_stat_account(struct mm_struct *mm, unsigned long flags, if (flags & VM_EXEC) mm->exec_vm += pages; } +#endif /* CONFIG_PROC_FS */ /* * The caller must hold down_write(current->mm->mmap_sem). |
