1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-02 12:20:51 +00:00

Assert that the page queues lock is held in vm_page_remove() and

vm_page_unwire() only if the page is managed, i.e., pageable.
This commit is contained in:
Alan Cox 2010-05-03 07:00:50 +00:00
parent 913814935a
commit 9f2512bab5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=207551

View File

@ -790,6 +790,8 @@ vm_page_remove(vm_page_t m)
vm_object_t object;
vm_page_t root;
if ((m->flags & PG_UNMANAGED) == 0)
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
if ((object = m->object) == NULL)
return;
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
@ -797,7 +799,6 @@ vm_page_remove(vm_page_t m)
m->oflags &= ~VPO_BUSY;
vm_page_flash(m);
}
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
/*
* Now remove from the object's list of backed pages.
@ -1586,7 +1587,8 @@ void
vm_page_unwire(vm_page_t m, int activate)
{
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
if ((m->flags & PG_UNMANAGED) == 0)
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
if (m->flags & PG_FICTITIOUS)
return;
if (m->wire_count > 0) {