[PATCH v7 4/8] mm/rmap: Split migration into its own function