diff options
author | alc <alc@FreeBSD.org> | 2003-09-17 06:55:42 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-09-17 06:55:42 +0000 |
commit | eb3ecef7c88df24101c0f71070a062537548de5b (patch) | |
tree | a7d31037fc37767ec39809a0c6df316b38ee502d | |
parent | 9fef1a54f6f656d196b49d53fe630e7b38e4fb0b (diff) | |
download | FreeBSD-src-eb3ecef7c88df24101c0f71070a062537548de5b.zip FreeBSD-src-eb3ecef7c88df24101c0f71070a062537548de5b.tar.gz |
When calling vget() on a vnode-backed vm object, acquire the vnode
interlock before releasing the vm object's lock.
-rw-r--r-- | sys/vm/vm_pageout.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 18c9df9..4da592e 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -926,13 +926,14 @@ rescan0: */ 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; |