diff --git a/kernel/fork.c b/kernel/fork.c index cdef6cea8900d67910bb1199ca7728c045a1737b..b65187f0c74e720281ff6f08b98e3bef19e638c4 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;