The softleaf_is_migration() check is unreachable as entries that are not device_private are filtered out. Similarly, the PTE-level equivalent in migrate_vma_collect_pmd() skips migration entries. This dead branch also contained a double spin_unlock(ptl) bug. Suggested-by: Matthew Brost Signed-off-by: Davidlohr Bueso --- mm/migrate_device.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mm/migrate_device.c b/mm/migrate_device.c index c2855235fd9a..b40c1d49677d 100644 --- a/mm/migrate_device.c +++ b/mm/migrate_device.c @@ -175,13 +175,6 @@ static int migrate_vma_collect_huge_pmd(pmd_t *pmdp, unsigned long start, return migrate_vma_collect_skip(start, end, walk); } - if (softleaf_is_migration(entry)) { - migration_entry_wait_on_locked(entry, ptl); - spin_unlock(ptl); - return -EAGAIN; - } - if (softleaf_is_device_private_write(entry)) write = MIGRATE_PFN_WRITE; } else { -- 2.39.5