]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm/huge_memory: rename mmun_start to haddr in remove_migration_pmd
authorMiaohe Lin <linmiaohe@huawei.com>
Mon, 4 Jul 2022 13:21:51 +0000 (21:21 +0800)
committerakpm <akpm@linux-foundation.org>
Mon, 18 Jul 2022 00:14:45 +0000 (17:14 -0700)
mmun_start indicates mmu_notifier start address but there's no mmu_notifier
stuff in remove_migration_pmd. This will make it hard to get the meaning of
mmun_start. Rename it to haddr to avoid confusing readers and also imporve
readability.

Link: https://lkml.kernel.org/r/20220704132201.14611-7-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Zach O'Keefe <zokeefe@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c

index ebf2a71931c1ab99bebdcb99dc0fb628262f21b2..5816ef8241af99983cf72fc79fc3ec57aa76b646 100644 (file)
@@ -3180,7 +3180,7 @@ void remove_migration_pmd(struct page_vma_mapped_walk *pvmw, struct page *new)
        struct vm_area_struct *vma = pvmw->vma;
        struct mm_struct *mm = vma->vm_mm;
        unsigned long address = pvmw->address;
-       unsigned long mmun_start = address & HPAGE_PMD_MASK;
+       unsigned long haddr = address & HPAGE_PMD_MASK;
        pmd_t pmde;
        swp_entry_t entry;
 
@@ -3203,12 +3203,12 @@ void remove_migration_pmd(struct page_vma_mapped_walk *pvmw, struct page *new)
                if (!is_readable_migration_entry(entry))
                        rmap_flags |= RMAP_EXCLUSIVE;
 
-               page_add_anon_rmap(new, vma, mmun_start, rmap_flags);
+               page_add_anon_rmap(new, vma, haddr, rmap_flags);
        } else {
                page_add_file_rmap(new, vma, true);
        }
        VM_BUG_ON(pmd_write(pmde) && PageAnon(new) && !PageAnonExclusive(new));
-       set_pmd_at(mm, mmun_start, pvmw->pmd, pmde);
+       set_pmd_at(mm, haddr, pvmw->pmd, pmde);
 
        /* No need to invalidate - it was non-present before */
        update_mmu_cache_pmd(vma, address, pvmw->pmd);