diff options
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_object.c | 2 | ||||
-rw-r--r-- | sys/vm/vm_page.c | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index c86a2bb..472f254 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1364,10 +1364,8 @@ vm_object_split(vm_map_entry_t entry) swap_pager_copy(orig_object, new_object, offidxstart, 0); } VM_OBJECT_UNLOCK(orig_object); - vm_page_lock_queues(); TAILQ_FOREACH(m, &new_object->memq, listq) vm_page_wakeup(m); - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(new_object); entry->object.vm_object = new_object; entry->offset = 0LL; diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 0c971c5..c191d60 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1472,12 +1472,13 @@ retrylookup: return (NULL); goto retrylookup; } else { - vm_page_lock_queues(); - if (allocflags & VM_ALLOC_WIRED) + if ((allocflags & VM_ALLOC_WIRED) != 0) { + vm_page_lock_queues(); vm_page_wire(m); + vm_page_unlock_queues(); + } if ((allocflags & VM_ALLOC_NOBUSY) == 0) vm_page_busy(m); - vm_page_unlock_queues(); return (m); } } |