1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

When calling vget() on a vnode-backed vm object, acquire the vnode

interlock before releasing the vm object's lock.
This commit is contained in:
Alan Cox 2003-09-17 06:55:42 +00:00
parent 9e3275a35b
commit 4b5f553179
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120150

View File

@ -926,13 +926,14 @@ vm_pageout_scan(int pass)
*/
if (object->type == OBJT_VNODE) {
vp = object->handle;
mp = NULL;
if (vp->v_type == VREG)
vn_start_write(vp, &mp, V_NOWAIT);
vm_page_unlock_queues();
VI_LOCK(vp);
VM_OBJECT_UNLOCK(object);
if (vget(vp, LK_EXCLUSIVE|LK_TIMELOCK, curthread)) {
if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK |
LK_TIMELOCK, curthread)) {
VM_OBJECT_LOCK(object);
vm_page_lock_queues();
++pageout_lock_miss;