mm/migrate.c: clean up useless code in migrate_vma_collect_pmd()
Remove unused 'pfn' variable. Link: http://lkml.kernel.org/r/1565167272-21453-1-git-send-email-kernelfans@gmail.com Signed-off-by: Pingfan Liu <kernelfans@gmail.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Ralph Campbell <rcampbell@nvidia.com> Cc: "Jérôme Glisse" <jglisse@redhat.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Jan Kara <jack@suse.cz> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
f60858f9d3
commit
276f756d70
|
@ -2218,17 +2218,15 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp,
|
|||
pte_t pte;
|
||||
|
||||
pte = *ptep;
|
||||
pfn = pte_pfn(pte);
|
||||
|
||||
if (pte_none(pte)) {
|
||||
mpfn = MIGRATE_PFN_MIGRATE;
|
||||
migrate->cpages++;
|
||||
pfn = 0;
|
||||
goto next;
|
||||
}
|
||||
|
||||
if (!pte_present(pte)) {
|
||||
mpfn = pfn = 0;
|
||||
mpfn = 0;
|
||||
|
||||
/*
|
||||
* Only care about unaddressable device page special
|
||||
|
@ -2245,10 +2243,10 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp,
|
|||
if (is_write_device_private_entry(entry))
|
||||
mpfn |= MIGRATE_PFN_WRITE;
|
||||
} else {
|
||||
pfn = pte_pfn(pte);
|
||||
if (is_zero_pfn(pfn)) {
|
||||
mpfn = MIGRATE_PFN_MIGRATE;
|
||||
migrate->cpages++;
|
||||
pfn = 0;
|
||||
goto next;
|
||||
}
|
||||
page = vm_normal_page(migrate->vma, addr, pte);
|
||||
|
@ -2258,10 +2256,9 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp,
|
|||
|
||||
/* FIXME support THP */
|
||||
if (!page || !page->mapping || PageTransCompound(page)) {
|
||||
mpfn = pfn = 0;
|
||||
mpfn = 0;
|
||||
goto next;
|
||||
}
|
||||
pfn = page_to_pfn(page);
|
||||
|
||||
/*
|
||||
* By getting a reference on the page we pin it and that blocks
|
||||
|
|
Loading…
Reference in New Issue