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