[PATCH] libata ata_data_xfer() fix
[pandora-kernel.git] / kernel / fork.c
index cdef6ce..b65187f 100644 (file)
@@ -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;