linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Robert Love <rml@tech9.net>,
	Andrew Morton <akpm@zip.com.au>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] vmacct5/9 remove unhelpful vm_unacct_vma
Date: Mon, 29 Jul 2002 23:10:24 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.21.0207292309210.1184-100000@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.21.0207292257001.1184-100000@localhost.localdomain>

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);


  parent reply	other threads:[~2002-07-29 22:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-29 22:03 9 vmacct patches to follow Hugh Dickins
2002-07-29 22:04 ` [PATCH] vmacct1/9 shmem_file_write rounding VM_ACCT Hugh Dickins
2002-07-29 22:06 ` [PATCH] vmacct2/9 SHMEM_MAX_BYTES overflow checking Hugh Dickins
2002-07-29 22:07 ` [PATCH] vmacct3/9 mremap MAP_NORESERVE not in flags Hugh Dickins
2002-07-29 22:09 ` [PATCH] vmacct4/9 mmap MAP_NORESERVE not in vm_flags Hugh Dickins
2002-07-29 22:10 ` Hugh Dickins [this message]
2002-07-29 22:12 ` [PATCH] vmacct6/9 fix shared and private accounting Hugh Dickins
2002-07-29 22:13 ` [PATCH] vmacct7/9 update overcommit doc and comment Hugh Dickins
2002-07-29 22:14 ` [PATCH] vmacct8/9 shmem_file_setup when MAP_NORESERVE Hugh Dickins
2002-07-29 22:16 ` [PATCH] vmacct9/9 remove acct arg from do_munmap Hugh Dickins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.21.0207292309210.1184-100000@localhost.localdomain \
    --to=hugh@veritas.com \
    --cc=akpm@zip.com.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@tech9.net \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).