Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fa5b16b authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman
Browse files

powerpc/mm/hugetlb: Use pte_access_permitted for hugetlb access check



No functional change in this patch. This update gup_hugepte to use the
helper. This will help later when we add memory keys.

Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 7e436355
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -855,9 +855,7 @@ int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long addr,

	pte = READ_ONCE(*ptep);

	if (!pte_present(pte) || !pte_read(pte))
		return 0;
	if (write && !pte_write(pte))
	if (!pte_access_permitted(pte, write))
		return 0;

	/* hugepages are never "special" */