Convert xen_mm_unpin_all() to ptdescs in preparation for the eventual splitting of ptdescs from struct page. Continue checking PagePinned through the underlying page as we do not have a per-memdesc api yet. Acked-by: Mike Rapoport (Microsoft) Reviewed-by: William Kucharski Reviewed-by: Juergen Gross Signed-off-by: Vishal Moola --- arch/x86/xen/mmu_pv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index 7b23a34db8ff..6ff5a7130e53 100644 --- a/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/mmu_pv.c @@ -947,16 +947,16 @@ static void xen_pgd_unpin(struct mm_struct *mm) */ void xen_mm_unpin_all(void) { - struct page *page; + struct ptdesc *ptdesc; spin_lock(&init_mm.page_table_lock); spin_lock(&pgd_lock); - list_for_each_entry(page, &pgd_list, lru) { - if (PageSavePinned(page)) { - BUG_ON(!PagePinned(page)); - __xen_pgd_unpin(&init_mm, (pgd_t *)page_address(page)); - ClearPageSavePinned(page); + list_for_each_entry(ptdesc, &pgd_list, pt_list) { + if (PageSavePinned(ptdesc_page(ptdesc))) { + BUG_ON(!PagePinned(ptdesc_page(ptdesc))); + __xen_pgd_unpin(&init_mm, (pgd_t *)ptdesc_address(ptdesc)); + ClearPageSavePinned(ptdesc_page(ptdesc)); } } -- 2.54.0