Synchronize access to a page's valid field by using the lock from its

containing object.
This commit is contained in:
Alan Cox 2003-10-04 09:20:00 +00:00
parent 8b5905a47d
commit 10e9e2d1b9

View File

@ -821,7 +821,6 @@ spec_getpages(ap)
}
}
vm_page_unlock_queues();
VM_OBJECT_UNLOCK(ap->a_m[ap->a_reqpage]->object);
if (!gotreqpage) {
m = ap->a_m[ap->a_reqpage];
printf(
@ -833,12 +832,14 @@ spec_getpages(ap)
printf(
" nread: %d, reqpage: %d, pindex: %lu, pcount: %d\n",
nread, ap->a_reqpage, (u_long)m->pindex, pcount);
VM_OBJECT_UNLOCK(m->object);
/*
* Free the buffer header back to the swap buffer pool.
*/
relpbuf(bp, NULL);
return VM_PAGER_ERROR;
}
VM_OBJECT_UNLOCK(ap->a_m[ap->a_reqpage]->object);
/*
* Free the buffer header back to the swap buffer pool.
*/