In vm_map_simplify_entryvm_map_entry_resize_free, according to its intro comment, is for resizing a map entry in-place, without a call to vm_map_entry_link or _unlink. Nevertheless, if the entry and its next-entry can be merged,vm_map.c often calls it after a call to vm_map_entry_unlink. Those calls are needed because those callers do not fix the start and end fields of the neighbor of the doomed node before unlinking it. then the next is removed from the map before the entry->end field is updatedTherefore, so athe unlink call sets wrong adj_free value is set for entrys for one of those neighbors, and that has to be fixed.vm_map_entry_resize_free is invoked after the start/end values are corrected, If the entry->end field is updated firstto fix adj_free.
This change seeks to drop three such calls to vm_map_entry_resize_free, there's no need for a fix laterby setting the start/end values correctly before the _unlink call.