Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/vfs_subr.c
Show First 20 Lines • Show All 1,780 Lines • ▼ Show 20 Lines | bufobj_invalbuf(struct bufobj *bo, int flags, int slpflag, int slptimeo) | ||||
/* | /* | ||||
* Wait for I/O to complete. XXX needs cleaning up. The vnode can | * Wait for I/O to complete. XXX needs cleaning up. The vnode can | ||||
* have write I/O in-progress but if there is a VM object then the | * have write I/O in-progress but if there is a VM object then the | ||||
* VM object can also have read-I/O in-progress. | * VM object can also have read-I/O in-progress. | ||||
*/ | */ | ||||
do { | do { | ||||
bufobj_wwait(bo, 0, 0); | bufobj_wwait(bo, 0, 0); | ||||
if ((flags & V_VMIO) == 0) { | if ((flags & V_VMIO) == 0 && bo->bo_object != NULL) { | ||||
BO_UNLOCK(bo); | BO_UNLOCK(bo); | ||||
if (bo->bo_object != NULL) { | vm_object_pip_wait_unlocked(bo->bo_object, "bovlbx"); | ||||
VM_OBJECT_WLOCK(bo->bo_object); | |||||
vm_object_pip_wait(bo->bo_object, "bovlbx"); | |||||
VM_OBJECT_WUNLOCK(bo->bo_object); | |||||
} | |||||
BO_LOCK(bo); | BO_LOCK(bo); | ||||
} | } | ||||
} while (bo->bo_numoutput > 0); | } while (bo->bo_numoutput > 0); | ||||
BO_UNLOCK(bo); | BO_UNLOCK(bo); | ||||
/* | /* | ||||
* Destroy the copy in the VM cache, too. | * Destroy the copy in the VM cache, too. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 3,908 Lines • Show Last 20 Lines |