1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-12 14:29:28 +00:00

Lock the vm object when freeing a vm page.

This commit is contained in:
Alan Cox 2003-06-19 17:56:12 +00:00
parent e2a474429e
commit a38918cdbd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=116583

View File

@ -765,6 +765,7 @@ spec_getpages(ap)
pmap_qremove(kva, pcount);
gotreqpage = 0;
VM_OBJECT_LOCK(vp->v_object);
vm_page_lock_queues();
for (i = 0, toff = 0; i < pcount; i++, toff = nextoff) {
nextoff = toff + PAGE_SIZE;
@ -817,6 +818,7 @@ spec_getpages(ap)
}
}
vm_page_unlock_queues();
VM_OBJECT_UNLOCK(vp->v_object);
if (!gotreqpage) {
m = ap->a_m[ap->a_reqpage];
printf(