Message ID | 20210709131638.887630622@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c index 16adeef76d00..a612daef5f00 100644 --- a/mm/page_vma_mapped.c +++ b/mm/page_vma_mapped.c @@ -271,6 +271,10 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw) goto restart; } pvmw->pte++; + if ((pvmw->flags & PVMW_SYNC) && !pvmw->ptl) { + pvmw->ptl = pte_lockptr(mm, pvmw->pmd); + spin_lock(pvmw->ptl); + } } while (pte_none(*pvmw->pte)); if (!pvmw->ptl) {