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
@@ -1134,11 +1134,11 @@ static inline pmd_t pmd_read_atomic(pmd_t *pmdp)
|
||||
#endif
|
||||
/*
|
||||
* This function is meant to be used by sites walking pagetables with
|
||||
* the mmap_sem hold in read mode to protect against MADV_DONTNEED and
|
||||
* the mmap_lock held in read mode to protect against MADV_DONTNEED and
|
||||
* transhuge page faults. MADV_DONTNEED can convert a transhuge pmd
|
||||
* into a null pmd and the transhuge page fault can convert a null pmd
|
||||
* into an hugepmd or into a regular pmd (if the hugepage allocation
|
||||
* fails). While holding the mmap_sem in read mode the pmd becomes
|
||||
* fails). While holding the mmap_lock in read mode the pmd becomes
|
||||
* stable and stops changing under us only if it's not null and not a
|
||||
* transhuge pmd. When those races occurs and this function makes a
|
||||
* difference vs the standard pmd_none_or_clear_bad, the result is
|
||||
@@ -1148,7 +1148,7 @@ static inline pmd_t pmd_read_atomic(pmd_t *pmdp)
|
||||
*
|
||||
* For 32bit kernels with a 64bit large pmd_t this automatically takes
|
||||
* care of reading the pmd atomically to avoid SMP race conditions
|
||||
* against pmd_populate() when the mmap_sem is hold for reading by the
|
||||
* against pmd_populate() when the mmap_lock is hold for reading by the
|
||||
* caller (a special atomic read not done by "gcc" as in the generic
|
||||
* version above, is also needed when THP is disabled because the page
|
||||
* fault can populate the pmd from under us).
|
||||
|
Reference in New Issue
Block a user