[PATCH v9 04/10] mm/rmap: Split migration into its own function