Don't require write locks on the VM object for vm_page_prev/next.

Reviewed by:	kib
Sponsored by:	Chelsio Communications
This commit is contained in:
jhb 2016-04-29 17:35:28 +00:00
parent e84bb9d29d
commit 178ec26e82

View File

@ -1283,7 +1283,7 @@ vm_page_next(vm_page_t m)
{
vm_page_t next;
VM_OBJECT_ASSERT_WLOCKED(m->object);
VM_OBJECT_ASSERT_LOCKED(m->object);
if ((next = TAILQ_NEXT(m, listq)) != NULL &&
next->pindex != m->pindex + 1)
next = NULL;
@ -1301,7 +1301,7 @@ vm_page_prev(vm_page_t m)
{
vm_page_t prev;
VM_OBJECT_ASSERT_WLOCKED(m->object);
VM_OBJECT_ASSERT_LOCKED(m->object);
if ((prev = TAILQ_PREV(m, pglist, listq)) != NULL &&
prev->pindex != m->pindex - 1)
prev = NULL;