Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/vfs_subr.c
Show First 20 Lines • Show All 2,996 Lines • ▼ Show 20 Lines | vinactive(struct vnode *vp, struct thread *td) | ||||
* | * | ||||
* The write-out of the dirty pages is asynchronous. At the | * The write-out of the dirty pages is asynchronous. At the | ||||
* point that VOP_INACTIVE() is called, there could still be | * point that VOP_INACTIVE() is called, there could still be | ||||
* pending I/O and dirty pages in the object. | * pending I/O and dirty pages in the object. | ||||
*/ | */ | ||||
obj = vp->v_object; | obj = vp->v_object; | ||||
if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { | if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { | ||||
VM_OBJECT_WLOCK(obj); | VM_OBJECT_WLOCK(obj); | ||||
vm_object_page_clean(obj, 0, 0, OBJPC_NOSYNC); | vm_object_page_clean(obj, 0, 0, 0); | ||||
VM_OBJECT_WUNLOCK(obj); | VM_OBJECT_WUNLOCK(obj); | ||||
} | } | ||||
VOP_INACTIVE(vp, td); | VOP_INACTIVE(vp, td); | ||||
VI_LOCK(vp); | VI_LOCK(vp); | ||||
VNASSERT(vp->v_iflag & VI_DOINGINACT, vp, | VNASSERT(vp->v_iflag & VI_DOINGINACT, vp, | ||||
("vinactive: lost VI_DOINGINACT")); | ("vinactive: lost VI_DOINGINACT")); | ||||
vp->v_iflag &= ~VI_DOINGINACT; | vp->v_iflag &= ~VI_DOINGINACT; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,413 Lines • Show Last 20 Lines |