diff options
author | Pingfan Liu <[email protected]> | 2019-09-23 15:37:38 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-09-24 15:54:10 -0700 |
commit | 276f756d7002ceb66f8ae3f7bd8028e7ae3deed8 (patch) | |
tree | 23e201e54a28705b0c5c453c43a4338f98e590ca | |
parent | f60858f9d327c4dd0c432abe9ec943a83929c229 (diff) |
mm/migrate.c: clean up useless code in migrate_vma_collect_pmd()
Remove unused 'pfn' variable.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Pingfan Liu <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Reviewed-by: Ralph Campbell <[email protected]>
Cc: "Jérôme Glisse" <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/migrate.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index 374ef2fcb722..73d476d690b1 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2218,17 +2218,15 @@ again: 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 @@ again: 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 @@ again: /* 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 |