diff options
author | alc <alc@FreeBSD.org> | 2004-10-28 05:26:21 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-10-28 05:26:21 +0000 |
commit | f73575dddd59136880e0c9d55d3c84647a79f4bb (patch) | |
tree | 006cf81801c2e77d5936923c07b0cc0eef83fb1a /sys/vm | |
parent | effc4c4363c7a9695dc371424e2b421dfb4b45ab (diff) | |
download | FreeBSD-src-f73575dddd59136880e0c9d55d3c84647a79f4bb.zip FreeBSD-src-f73575dddd59136880e0c9d55d3c84647a79f4bb.tar.gz |
Assert that the containing vm object is locked in vm_page_cache() and
vm_page_try_to_cache().
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 7cf2bf7..5001c78 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1266,6 +1266,7 @@ vm_page_try_to_cache(vm_page_t m) { mtx_assert(&vm_page_queue_mtx, MA_OWNED); + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); if (m->dirty || m->hold_count || m->busy || m->wire_count || (m->flags & (PG_BUSY|PG_UNMANAGED))) { return (0); @@ -1314,6 +1315,7 @@ vm_page_cache(vm_page_t m) { mtx_assert(&vm_page_queue_mtx, MA_OWNED); + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); if ((m->flags & (PG_BUSY|PG_UNMANAGED)) || m->busy || m->hold_count || m->wire_count) { printf("vm_page_cache: attempting to cache busy page\n"); |