mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Assert that the containing object is locked in vm_page_io_start() and
vm_page_io_finish(). The motivation being to transition synchronization of the vm_page's busy field from the global page queues lock to the per-object lock.
This commit is contained in:
parent
a4ebbf932d
commit
36aeb90e34
1 changed files with 2 additions and 0 deletions
|
|
@ -335,6 +335,7 @@ void
|
|||
vm_page_io_start(vm_page_t m)
|
||||
{
|
||||
|
||||
VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED);
|
||||
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
|
||||
m->busy++;
|
||||
}
|
||||
|
|
@ -343,6 +344,7 @@ void
|
|||
vm_page_io_finish(vm_page_t m)
|
||||
{
|
||||
|
||||
VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED);
|
||||
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
|
||||
m->busy--;
|
||||
if (m->busy == 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue