summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-10-17 22:33:40 +0000
committeralc <alc@FreeBSD.org>2004-10-17 22:33:40 +0000
commitb36ed839e4822fe325b30fcd7a9ec42feaec5c68 (patch)
tree5c7df5c08839256e563f1f9d5733a39870e1ddac /sys/vm/vm_page.c
parent34bc20db3512afee443cafaf4d247df162ae7dda (diff)
downloadFreeBSD-src-b36ed839e4822fe325b30fcd7a9ec42feaec5c68.zip
FreeBSD-src-b36ed839e4822fe325b30fcd7a9ec42feaec5c68.tar.gz
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.
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r--sys/vm/vm_page.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 91683a6..561a5d8 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -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)
OpenPOWER on IntegriCloud