[PATCH 2/3] NOMMU: Merge __put_nommu_region() into put_nommu_region()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
Acked-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
---

 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@xxxxxxxxx.  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@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]