mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
mmap locking API: convert mmap_sem comments
Convert comments that reference mmap_sem to reference mmap_lock instead. [akpm@linux-foundation.org: fix up linux-next leftovers] [akpm@linux-foundation.org: s/lockaphore/lock/, per Vlastimil] [akpm@linux-foundation.org: more linux-next fixups, per Michel] Signed-off-by: Michel Lespinasse <walken@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com> Cc: Davidlohr Bueso <dbueso@suse.de> Cc: David Rientjes <rientjes@google.com> Cc: Hugh Dickins <hughd@google.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Jerome Glisse <jglisse@redhat.com> Cc: John Hubbard <jhubbard@nvidia.com> Cc: Laurent Dufour <ldufour@linux.ibm.com> Cc: Liam Howlett <Liam.Howlett@oracle.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ying Han <yinghan@google.com> Link: http://lkml.kernel.org/r/20200520052908.204642-13-walken@google.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
3e4e28c5a8
commit
c1e8d7c6a7
@@ -49,7 +49,7 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
|
||||
bool uffd_wp_resolve = cp_flags & MM_CP_UFFD_WP_RESOLVE;
|
||||
|
||||
/*
|
||||
* Can be called with only the mmap_sem for reading by
|
||||
* Can be called with only the mmap_lock for reading by
|
||||
* prot_numa so we must check the pmd isn't constantly
|
||||
* changing from under us from pmd_none to pmd_trans_huge
|
||||
* and/or the other way around.
|
||||
@@ -59,7 +59,7 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
|
||||
|
||||
/*
|
||||
* The pmd points to a regular pte so the pmd can't change
|
||||
* from under us even if the mmap_sem is only hold for
|
||||
* from under us even if the mmap_lock is only hold for
|
||||
* reading.
|
||||
*/
|
||||
pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
|
||||
@@ -228,7 +228,7 @@ static inline unsigned long change_pmd_range(struct vm_area_struct *vma,
|
||||
next = pmd_addr_end(addr, end);
|
||||
|
||||
/*
|
||||
* Automatic NUMA balancing walks the tables with mmap_sem
|
||||
* Automatic NUMA balancing walks the tables with mmap_lock
|
||||
* held for read. It's possible a parallel update to occur
|
||||
* between pmd_trans_huge() and a pmd_none_or_clear_bad()
|
||||
* check leading to a false positive and clearing.
|
||||
@@ -477,7 +477,7 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
|
||||
|
||||
success:
|
||||
/*
|
||||
* vm_flags and vm_page_prot are protected by the mmap_sem
|
||||
* vm_flags and vm_page_prot are protected by the mmap_lock
|
||||
* held in write mode.
|
||||
*/
|
||||
vma->vm_flags = newflags;
|
||||
|
Reference in New Issue
Block a user