From: David Howells <dhowells@redhat.com>
To: torvalds@linux-foundation.org
Cc: linux-mm@kvack.org, uclinux-dev@uclinux.org, gerg@uclinux.org,
lethal@linux-sh.org, David Howells <dhowells@redhat.com>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: [PATCH 2/3] NOMMU: Merge __put_nommu_region() into put_nommu_region()
Date: Thu, 23 Feb 2012 13:50:49 +0000 [thread overview]
Message-ID: <20120223135049.24278.76524.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20120223135035.24278.96099.stgit@warthog.procyon.org.uk>
Merge __put_nommu_region() into put_nommu_region() in the NOMMU mmap code as
that's the only remaining user.
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
---
mm/nommu.c | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/mm/nommu.c b/mm/nommu.c
index ee7e57e..d02ee35 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -615,15 +615,15 @@ static void free_page_series(unsigned long from, unsigned long to)
/*
* release a reference to a region
- * - the caller must hold the region semaphore for writing, which this releases
* - the region may not have been added to the tree yet, in which case vm_top
* will equal vm_start
*/
-static void __put_nommu_region(struct vm_region *region)
- __releases(nommu_region_sem)
+static void put_nommu_region(struct vm_region *region)
{
kenter("%p{%d}", region, region->vm_usage);
+ down_write(&nommu_region_sem);
+
BUG_ON(!nommu_region_tree.rb_node);
if (--region->vm_usage == 0) {
@@ -647,15 +647,6 @@ static void __put_nommu_region(struct vm_region *region)
}
/*
- * release a reference to a region
- */
-static void put_nommu_region(struct vm_region *region)
-{
- down_write(&nommu_region_sem);
- __put_nommu_region(region);
-}
-
-/*
* update protection on a vma
*/
static void protect_vma(struct vm_area_struct *vma, unsigned long flags)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-02-23 13:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 13:50 [PATCH 1/3] NOMMU: Lock i_mmap_mutex for access to the VMA prio list David Howells
2012-02-23 13:50 ` David Howells [this message]
2012-02-23 13:51 ` [PATCH 3/3] NOMMU: Don't need to clear vm_mm when deleting a VMA David Howells
2012-02-23 13:52 ` [PATCH 2/3] NOMMU: Merge __put_nommu_region() into put_nommu_region() David Howells
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=20120223135049.24278.76524.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=gerg@uclinux.org \
--cc=lethal@linux-sh.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@linux-foundation.org \
--cc=uclinux-dev@uclinux.org \
--cc=viro@zeniv.linux.org.uk \
/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