diff options
author | alc <alc@FreeBSD.org> | 2004-10-17 22:33:40 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-10-17 22:33:40 +0000 |
commit | b36ed839e4822fe325b30fcd7a9ec42feaec5c68 (patch) | |
tree | 5c7df5c08839256e563f1f9d5733a39870e1ddac /sys/vm | |
parent | 34bc20db3512afee443cafaf4d247df162ae7dda (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/vm/vm_page.c | 2 |
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) |