lkml.org 
[lkml]   [2018]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 63/64] mm/mmap: hack drop down_write_nest_lock()
Date
From: Davidlohr Bueso <dave@stgolabs.net>

* THIS IS A HACK *

Directly call down_write() on i_mmap_rwsem (such that
we don't have to convert it to a range lock)

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
---
mm/mmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index e10d005f7e2f..1d3a5edd19b2 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -3394,7 +3394,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
@@ -3424,7 +3424,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.13.6
\
 
 \ /
  Last update: 2018-02-05 02:31    [W:3.095 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site