[PATCH] vmacct5/9 remove unhelpful vm_unacct_vma

Hugh Dickins (hugh@veritas.com)
Mon, 29 Jul 2002 23:10:24 +0100 (BST)


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/