Use the acquired reference to the vmspace instead of direct dereferencing

of p->p_vmspace in a place where it was missed in r191277.

Noted by:  pluknet gmail com
This commit is contained in:
Konstantin Belousov 2009-04-28 11:45:36 +00:00
parent 8eb5a1cdee
commit 7981aa2431

View File

@ -1243,7 +1243,7 @@ vm_pageout_oom(int shortage)
PROC_UNLOCK(p);
continue;
}
size = vmspace_swap_count(p->p_vmspace);
size = vmspace_swap_count(vm);
vm_map_unlock_read(&vm->vm_map);
if (shortage == VM_OOM_MEM)
size += vmspace_resident_count(vm);