Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_subr.c
Show First 20 Lines • Show All 2,026 Lines • ▼ Show 20 Lines | if (flags & V_SAVE) { | ||||
} | } | ||||
if (bo->bo_dirty.bv_cnt > 0) { | if (bo->bo_dirty.bv_cnt > 0) { | ||||
BO_UNLOCK(bo); | BO_UNLOCK(bo); | ||||
do { | do { | ||||
error = BO_SYNC(bo, MNT_WAIT); | error = BO_SYNC(bo, MNT_WAIT); | ||||
} while (error == ERELOOKUP); | } while (error == ERELOOKUP); | ||||
if (error != 0) | if (error != 0) | ||||
return (error); | return (error); | ||||
/* | |||||
* XXX We could save a lock/unlock if this was only | |||||
* enabled under INVARIANTS | |||||
*/ | |||||
BO_LOCK(bo); | BO_LOCK(bo); | ||||
if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0) | if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0) { | ||||
panic("vinvalbuf: dirty bufs"); | BO_UNLOCK(bo); | ||||
return (EBUSY); | |||||
} | |||||
} | } | ||||
} | } | ||||
/* | /* | ||||
* If you alter this loop please notice that interlock is dropped and | * If you alter this loop please notice that interlock is dropped and | ||||
* reacquired in flushbuflist. Special care is needed to ensure that | * reacquired in flushbuflist. Special care is needed to ensure that | ||||
* no race conditions occur from this. | * no race conditions occur from this. | ||||
*/ | */ | ||||
do { | do { | ||||
▲ Show 20 Lines • Show All 4,938 Lines • Show Last 20 Lines |