aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2006-08-06 00:15:40 +0000
committerAlan Cox <alc@FreeBSD.org>2006-08-06 00:15:40 +0000
commite74814b66aa79320b8934f04d7f2b02f1f691edf (patch)
tree9f78806ed07bf7435acc5a2fba922f01441f0c6c /sys/vm
parent3d0685834f4b672e7e470f08f4371f96c9aa856a (diff)
Notes
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_page.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 5905ee127fa8..00314930e973 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -496,9 +496,10 @@ int
vm_page_sleep_if_busy(vm_page_t m, int also_m_busy, const char *msg)
{
- mtx_assert(&vm_page_queue_mtx, MA_OWNED);
VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED);
if ((m->flags & PG_BUSY) || (also_m_busy && m->busy)) {
+ if (!mtx_owned(&vm_page_queue_mtx))
+ vm_page_lock_queues();
vm_page_flag_set(m, PG_WANTED | PG_REFERENCED);
vm_page_unlock_queues();