aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-07-12 13:58:09 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-12 16:00:58 -0700
commit3b6bfcdb116f2cc2cab921fcac6d39d4022952d2 (patch)
treeb9bdc0f85d16bac6de043883880c203627bab9c5 /kernel/fork.c
parent[PATCH] quiet ide-cd warning (diff)
downloadlinux-dev-3b6bfcdb116f2cc2cab921fcac6d39d4022952d2.tar.xz
linux-dev-3b6bfcdb116f2cc2cab921fcac6d39d4022952d2.zip
[PATCH] lower VM_DONTCOPY total_vm
dup_mmap of a VM_DONTCOPY vma forgot to lower the child's total_vm. (But no way does this account for the recent report of total_vm seen too low.) 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 'kernel/fork.c')
-rw-r--r--kernel/fork.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index cdef6cea8900..b65187f0c74e 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -208,8 +208,10 @@ static inline int dup_mmap(struct mm_struct * mm, struct mm_struct * oldmm)
struct file *file;
if (mpnt->vm_flags & VM_DONTCOPY) {
+ long pages = vma_pages(mpnt);
+ mm->total_vm -= pages;
__vm_stat_account(mm, mpnt->vm_flags, mpnt->vm_file,
- -vma_pages(mpnt));
+ -pages);
continue;
}
charge = 0;