This workarounds "Page already inserted" panic in vm_page_insert
routine triggered on attempt to mmap file created with shmem_file_setup
call. After introduction of "GTT mmap interface v4" a.k.a. MMAP_OFFSET,
vm_objects allocated by these calls may try to own intersected sets of
pages that leads to the assertion. To ensure that acceptor vm_object
borrows a page from the right donor one, the later must be explicitly
locked by a caller of vmf_insert_pfn_prot.
P.S. Proposed change looks like naive and dirty hack but works for me and is very simple.
This is follow up to https://reviews.freebsd.org/D31672