vnode_pager_generic_getpages() and swap_pager_getpages_locked() each include code to read a few pages behind, and a few pages ahead of, a specified page range. The same code can serve each function, and that code is encapsulated in two new vm_object_page functions. For the swap case, this also eliminates some needless linked-list traversal.