mm: introduce helper function set_max_mapnr()