[PATCH] vmacct5/9 remove unhelpful vm_unacct_vma

From: Hugh Dickins (hugh@veritas.com)
Date: Mon Jul 29 2002 - 17:10:24 EST


Remove vm_unacct_vma function: it's only used in one place,
which can do it better by using vm_unacct_memory directly.

--- vmacct4/mm/mmap.c Mon Jul 29 19:23:46 2002
+++ vmacct5/mm/mmap.c Mon Jul 29 19:23:46 2002
@@ -131,13 +131,6 @@
         return 0;
 }
 
-void vm_unacct_vma(struct vm_area_struct *vma)
-{
- int len = vma->vm_end - vma->vm_start;
- if (vma->vm_flags & VM_ACCOUNT)
- vm_unacct_memory(len >> PAGE_SHIFT);
-}
-
 /* Remove one vm structure from the inode's i_mapping address space. */
 static inline void __remove_shared_vm_struct(struct vm_area_struct *vma)
 {
@@ -1225,7 +1218,7 @@
                  * removal
                  */
                 if (mpnt->vm_flags & VM_ACCOUNT)
- vm_unacct_vma(mpnt);
+ vm_unacct_memory((end - start) >> PAGE_SHIFT);
 
                 mm->map_count--;
                 unmap_page_range(tlb, mpnt, start, end);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 30 2002 - 14:00:34 EST