Skip to contentSkip to conversation

mm: fix wrong comments about anon_vma lock

PATCH In review Yuanhan Liu 2 participants 2 messages Jan 24, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: fix wrong comments about anon_vma lock

We use rwsem since commit 5a50508. And most of comments are converted to the new rwsem lock; while just 2 more missed from:

	 $ git grep 'anon_vma->mutex'
---
 include/linux/mmu_notifier.h |    2 +-
 mm/mmap.c                    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/mmu_notifier.h +1 -1
index bc823c4..deca874 100644
@@ -151,7 +151,7 @@ struct mmu_notifier_ops {
  * Therefore notifier chains can only be traversed when either
  *
  * 1. mmap_sem is held.
- * 2. One of the reverse map locks is held (i_mmap_mutex or anon_vma->mutex).
+ * 2. One of the reverse map locks is held (i_mmap_mutex or anon_vma->rwsem).
  * 3. No other concurrent thread can access the list (release)
  */
 struct mmu_notifier {
mm/mmap.c +1 -1
index 35730ee..d1e4124 100644
@@ -2943,7 +2943,7 @@ static void vm_lock_mapping(struct mm_struct *mm, struct address_space *mapping)
  * vma in this mm is backed by the same anon_vma or address_space.
  *
  * We can take all the locks in random order because the VM code
- * taking i_mmap_mutex or anon_vma->mutex outside the mmap_sem never
+ * taking i_mmap_mutex or anon_vma->rwsem outside the mmap_sem never
  * takes more than one of them in a row. Secondly we're protected
  * against a concurrent mm_take_all_locks() by the mm_all_locks_mutex.
  *
Signature · 7 lines
1.7.7.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Yuanhan Liu

We use rwsem since commit 5a50508. And most of comments are converted to the new rwsem lock; while just 2 more missed from:

	 $ git grep 'anon_vma->mutex'

Thanks,

Ingo

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>