- Add bufobj_wrefl() to add a write ref to a bufobj that is already locked.

This commit is contained in:
Jeff Roberson 2005-05-30 07:01:18 +00:00
parent b147cf1db2
commit 1f22a07afd
2 changed files with 10 additions and 0 deletions

View File

@ -3666,6 +3666,15 @@ bufstrategy(struct bufobj *bo, struct buf *bp)
KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp));
}
void
bufobj_wrefl(struct bufobj *bo)
{
KASSERT(bo != NULL, ("NULL bo in bufobj_wref"));
ASSERT_BO_LOCKED(bo);
bo->bo_numoutput++;
}
void
bufobj_wref(struct bufobj *bo)
{

View File

@ -125,6 +125,7 @@ struct bufobj {
void bufobj_wdrop(struct bufobj *bo);
void bufobj_wref(struct bufobj *bo);
void bufobj_wrefl(struct bufobj *bo);
int bufobj_invalbuf(struct bufobj *bo, int flags, struct thread *td, int slpflag, int slptimeo);
int bufobj_wwait(struct bufobj *bo, int slpflag, int timeo);
int bufsync(struct bufobj *bo, int waitfor, struct thread *td);