1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00

There is no reason to perform the pmap_remove() on the kernel pmap while

the kmem object lock is held.  Do the pmap_remove() before acquiring the
kmem object lock.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Alan Cox 2014-05-23 16:22:36 +00:00
parent 79f387daa8
commit fa2f411c4e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=266588

View File

@ -396,9 +396,9 @@ kmem_unback(vm_object_t object, vm_offset_t addr, vm_size_t size)
KASSERT(object == kmem_object || object == kernel_object,
("kmem_unback: only supports kernel objects."));
pmap_remove(kernel_pmap, addr, addr + size);
offset = addr - VM_MIN_KERNEL_ADDRESS;
VM_OBJECT_WLOCK(object);
pmap_remove(kernel_pmap, addr, addr + size);
for (i = 0; i < size; i += PAGE_SIZE) {
m = vm_page_lookup(object, OFF_TO_IDX(offset + i));
vm_page_unwire(m, 0);