HomeFreeBSD

Avoid unnecessary object locking in vm_page_grab_pages_unlocked().

Description

Avoid unnecessary object locking in vm_page_grab_pages_unlocked().

We were needlessly acquiring the object lock to call
vm_page_grab_pages() even when all of the requested pages were looked up
locklessly. Fix that, stop testing for count == 0 in
vm_page_grab_pages(), and add assertions to help catch this kind of
mistake.

Reported by: cem
Reviewed by: alc, cem, dougm, jeff
Differential Revision: https://reviews.freebsd.org/D26304