diff options
| author | Xin LI <delphij@FreeBSD.org> | 2007-02-22 14:52:59 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2007-02-22 14:52:59 +0000 |
| commit | 74f094f6a4f1111cb040d17ca045a56a8266280d (patch) | |
| tree | 02d017c21a2be53bef07510745afd60a0022eb97 | |
| parent | d05d46160ad21631133b9b3623dd9d7bd29c5b44 (diff) | |
Notes
| -rw-r--r-- | sys/kern/vfs_bio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index cb7d16f6f5b6..5b5302d78ae9 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1182,7 +1182,7 @@ brelse(struct buf *bp) * cache the buffer. */ bp->b_flags |= B_INVAL; - if (LIST_FIRST(&bp->b_dep) != NULL) + if (!LIST_EMPTY(&bp->b_dep)) buf_deallocate(bp); if (bp->b_flags & B_DELWRI) { atomic_subtract_int(&numdirtybuffers, 1); @@ -1861,7 +1861,7 @@ restart: crfree(bp->b_wcred); bp->b_wcred = NOCRED; } - if (LIST_FIRST(&bp->b_dep) != NULL) + if (!LIST_EMPTY(&bp->b_dep)) buf_deallocate(bp); if (bp->b_vflags & BV_BKGRDINPROG) panic("losing buffer 3"); @@ -2180,7 +2180,7 @@ flushbufqueues(int queue, int flushdeps) continue; } - if (LIST_FIRST(&bp->b_dep) != NULL && buf_countdeps(bp, 0)) { + if (!LIST_EMPTY(&bp->b_dep) && buf_countdeps(bp, 0)) { if (flushdeps == 0) { BUF_UNLOCK(bp); continue; @@ -2514,7 +2514,7 @@ loop: bp->b_flags |= B_NOCACHE; bwrite(bp); } else { - if (LIST_FIRST(&bp->b_dep) == NULL) { + if (LIST_EMPTY(&bp->b_dep)) { bp->b_flags |= B_RELBUF; brelse(bp); } else { @@ -3183,7 +3183,7 @@ bufdone_finish(struct buf *bp) KASSERT(BUF_REFCNT(bp) > 0, ("biodone: bp %p not busy %d", bp, BUF_REFCNT(bp))); - if (LIST_FIRST(&bp->b_dep) != NULL) + if (!LIST_EMPTY(&bp->b_dep)) buf_complete(bp); if (bp->b_flags & B_VMIO) { |
