From: Alex Shi <[email protected]>

Replace pgtable_t by ptdesc in function __pte_alloc.
We will remove pgtable_t from all place.

Signed-off-by: Alex Shi <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Andrew Morton <[email protected]>
---
 mm/memory.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index b9f5cc0db3eb..5b01d94a0b5f 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -445,13 +445,13 @@ void pmd_install(struct mm_struct *mm, pmd_t *pmd, 
pgtable_t *pte)
 
 int __pte_alloc(struct mm_struct *mm, pmd_t *pmd)
 {
-       pgtable_t new = pte_alloc_one(mm);
-       if (!new)
+       struct ptdesc *ptdesc = page_ptdesc(pte_alloc_one(mm));
+       if (!ptdesc)
                return -ENOMEM;
 
-       pmd_install(mm, pmd, &new);
-       if (new)
-               pte_free(mm, new);
+       pmd_install(mm, pmd, (pgtable_t *)&ptdesc);
+       if (ptdesc)
+               pte_free(mm, ptdesc_page(ptdesc));
        return 0;
 }
 
-- 
2.43.0


Reply via email to