In vm_page_lookup() check the root of the vm object's splay tree for the
desired page before calling vm_page_splay().
This commit is contained in:
parent
db785f7f72
commit
4804edb44f
@ -649,9 +649,11 @@ vm_page_lookup(vm_object_t object, vm_pindex_t pindex)
|
||||
vm_page_t m;
|
||||
|
||||
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
|
||||
m = vm_page_splay(pindex, object->root);
|
||||
if ((object->root = m) != NULL && m->pindex != pindex)
|
||||
m = NULL;
|
||||
if ((m = object->root) != NULL && m->pindex != pindex) {
|
||||
m = vm_page_splay(pindex, m);
|
||||
if ((object->root = m)->pindex != pindex)
|
||||
m = NULL;
|
||||
}
|
||||
return (m);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user