mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-29 12:03:03 +00:00
Change vm_page_sleep_if_busy() so that it no longer requires the caller to
hold the page queues lock.
This commit is contained in:
parent
3d0685834f
commit
e74814b66a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161013
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user