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