summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/vm_page.c')
-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 5905ee1..0031493 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();
OpenPOWER on IntegriCloud