Update locking on the kernel_object to use the new macros.
This commit is contained in:
parent
e241ee6007
commit
a05b4b3347
@ -586,11 +586,11 @@ bufinit(void)
|
||||
*/
|
||||
|
||||
bogus_offset = kmem_alloc_pageable(kernel_map, PAGE_SIZE);
|
||||
vm_object_lock(kernel_object);
|
||||
VM_OBJECT_LOCK(kernel_object);
|
||||
bogus_page = vm_page_alloc(kernel_object,
|
||||
((bogus_offset - VM_MIN_KERNEL_ADDRESS) >> PAGE_SHIFT),
|
||||
VM_ALLOC_NORMAL | VM_ALLOC_WIRED);
|
||||
vm_object_unlock(kernel_object);
|
||||
VM_OBJECT_UNLOCK(kernel_object);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -3535,11 +3535,11 @@ vm_hold_load_pages(struct buf * bp, vm_offset_t from, vm_offset_t to)
|
||||
* could intefere with paging I/O, no matter which
|
||||
* process we are.
|
||||
*/
|
||||
vm_object_lock(kernel_object);
|
||||
VM_OBJECT_LOCK(kernel_object);
|
||||
p = vm_page_alloc(kernel_object,
|
||||
((pg - VM_MIN_KERNEL_ADDRESS) >> PAGE_SHIFT),
|
||||
VM_ALLOC_SYSTEM | VM_ALLOC_WIRED);
|
||||
vm_object_unlock(kernel_object);
|
||||
VM_OBJECT_UNLOCK(kernel_object);
|
||||
if (!p) {
|
||||
atomic_add_int(&vm_pageout_deficit,
|
||||
(to - pg) >> PAGE_SHIFT);
|
||||
|
@ -244,14 +244,14 @@ contigmalloc1(
|
||||
vm_map_unlock(map);
|
||||
|
||||
tmp_addr = addr;
|
||||
vm_object_lock(kernel_object);
|
||||
VM_OBJECT_LOCK(kernel_object);
|
||||
for (i = start; i < (start + size / PAGE_SIZE); i++) {
|
||||
vm_page_t m = &pga[i];
|
||||
vm_page_insert(m, kernel_object,
|
||||
OFF_TO_IDX(tmp_addr - VM_MIN_KERNEL_ADDRESS));
|
||||
tmp_addr += PAGE_SIZE;
|
||||
}
|
||||
vm_object_unlock(kernel_object);
|
||||
VM_OBJECT_UNLOCK(kernel_object);
|
||||
vm_map_wire(map, addr, addr + size, FALSE);
|
||||
|
||||
splx(s);
|
||||
|
Loading…
Reference in New Issue
Block a user