mm/page_vma_mapped.c: use helper function huge_pte_lock
Bugzilla: https://bugzilla.redhat.com/2160210 commit 8f0b747d7dde47e9f6ff64d176ad5fcf0a23d524 Author: Miaohe Lin <linmiaohe@huawei.com> Date: Sat Jul 9 17:24:40 2022 +0800 mm/page_vma_mapped.c: use helper function huge_pte_lock Use helper function huge_pte_lock() to lock the huge pte to simplify the code a bit. No functional change intended. Link: https://lkml.kernel.org/r/20220709092440.43018-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Chris von Recklinghausen <crecklin@redhat.com>
This commit is contained in:
parent
5063ee2178
commit
6bedbaffaa
|
@ -174,8 +174,7 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
|
|||
if (!pvmw->pte)
|
||||
return false;
|
||||
|
||||
pvmw->ptl = huge_pte_lockptr(hstate, mm, pvmw->pte);
|
||||
spin_lock(pvmw->ptl);
|
||||
pvmw->ptl = huge_pte_lock(hstate, mm, pvmw->pte);
|
||||
if (!check_pte(pvmw))
|
||||
return not_found(pvmw);
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue