diff options
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index b789149..cf0ea46 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -557,6 +557,7 @@ bufinit(void) bp->b_qindex = QUEUE_EMPTY; bp->b_vflags = 0; bp->b_xflags = 0; + bp->b_waiters = 0; LIST_INIT(&bp->b_dep); BUF_LOCKINIT(bp); TAILQ_INSERT_TAIL(&bufqueues[QUEUE_EMPTY], bp, b_freelist); @@ -1195,7 +1196,7 @@ brelse(struct buf *bp) if (bp->b_bufsize) allocbuf(bp, 0); if (bp->b_vp) - brelvp(bp); + (void) brelvp(bp); } } @@ -1337,7 +1338,7 @@ brelse(struct buf *bp) if (bp->b_bufsize != 0) allocbuf(bp, 0); if (bp->b_vp != NULL) - brelvp(bp); + (void) brelvp(bp); } if (BUF_LOCKRECURSED(bp)) { @@ -1401,7 +1402,7 @@ brelse(struct buf *bp) if (bp->b_flags & B_DELWRI) bundirty(bp); if (bp->b_vp) - brelvp(bp); + (void) brelvp(bp); } /* @@ -1569,7 +1570,7 @@ vfs_vmio_release(struct buf *bp) bp->b_npages = 0; bp->b_flags &= ~B_VMIO; if (bp->b_vp) - brelvp(bp); + (void) brelvp(bp); } /* @@ -1706,6 +1707,7 @@ getnewbuf(int slpflag, int slptimeo, int size, int maxsize) struct buf *nbp; int defrag = 0; int nqindex; + int waiters = 0; static int flushingbufs; /* @@ -1844,7 +1846,7 @@ restart: vfs_vmio_release(bp); } if (bp->b_vp) - brelvp(bp); + waiters = brelvp(bp); } /* @@ -1913,7 +1915,7 @@ restart: * Notify any waiters for the buffer lock about * identity change by freeing the buffer. */ - if (qindex == QUEUE_CLEAN && BUF_LOCKWAITERS(bp) > 0) { + if (qindex == QUEUE_CLEAN && waiters > 0) { bp->b_flags |= B_INVAL; bfreekva(bp); brelse(bp); |