Reduce the scope of the page queues lock in kern_sendfile() now that

vm_page_sleep_if_busy() no longer requires the caller to hold the page
queues lock.
This commit is contained in:
Alan Cox 2006-08-06 01:00:09 +00:00
parent e7e56b2889
commit 7c4b7ecc4c

View file

@ -2038,14 +2038,14 @@ retry_lookup:
VM_OBJECT_LOCK(obj);
goto retry_lookup;
}
} else {
vm_page_lock_queues();
if (vm_page_sleep_if_busy(pg, TRUE, "sfpbsy"))
goto retry_lookup;
} else if (vm_page_sleep_if_busy(pg, TRUE, "sfpbsy"))
goto retry_lookup;
else {
/*
* Wire the page so it does not get ripped out from
* under us.
*/
vm_page_lock_queues();
vm_page_wire(pg);
vm_page_unlock_queues();
}