Commit 3b6bfcdb authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds

[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: default avatarHugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 70d1d47c
...@@ -208,8 +208,10 @@ static inline int dup_mmap(struct mm_struct * mm, struct mm_struct * oldmm) ...@@ -208,8 +208,10 @@ static inline int dup_mmap(struct mm_struct * mm, struct mm_struct * oldmm)
struct file *file; struct file *file;
if (mpnt->vm_flags & VM_DONTCOPY) { 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, __vm_stat_account(mm, mpnt->vm_flags, mpnt->vm_file,
-vma_pages(mpnt)); -pages);
continue; continue;
} }
charge = 0; charge = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment