Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1626058 > unrolled thread

[RFC 3/4] Remove nest locking operation with mmap_sem

Started byLaurent Dufour <ldufour@linux.vnet.ibm.com>
First post2017-04-19 14:20 +0200
Last post2017-04-19 14:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC 3/4] Remove nest locking operation with mmap_sem Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-04-19 14:20 +0200

#1626058 — [RFC 3/4] Remove nest locking operation with mmap_sem

FromLaurent Dufour <ldufour@linux.vnet.ibm.com>
Date2017-04-19 14:20 +0200
Subject[RFC 3/4] Remove nest locking operation with mmap_sem
Message-ID<txWKu-3m5-33@gated-at.bofh.it>
The range locking framework doesn't yet provide nest locking
operation, so remove them assuming that the check is now good.

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
---
 mm/mmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index cd8fa7e74784..4df13e633e92 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -3284,7 +3284,7 @@ static void vm_lock_anon_vma(struct mm_struct *mm, struct anon_vma *anon_vma)
 		 * The LSB of head.next can't change from under us
 		 * because we hold the mm_all_locks_mutex.
 		 */
-		down_write_nest_lock(&anon_vma->root->rwsem, &mm->mmap_sem);
+		down_write(&anon_vma->root->rwsem);
 		/*
 		 * We can safely modify head.next after taking the
 		 * anon_vma->root->rwsem. If some other vma in this mm shares
@@ -3314,7 +3314,7 @@ static void vm_lock_mapping(struct mm_struct *mm, struct address_space *mapping)
 		 */
 		if (test_and_set_bit(AS_MM_ALL_LOCKS, &mapping->flags))
 			BUG();
-		down_write_nest_lock(&mapping->i_mmap_rwsem, &mm->mmap_sem);
+		down_write(&mapping->i_mmap_rwsem);
 	}
 }
 
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web