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