summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-02-22 14:52:59 +0000
committerdelphij <delphij@FreeBSD.org>2007-02-22 14:52:59 +0000
commitb1293d942048743241fdb7f3984117450c2ce046 (patch)
tree02d017c21a2be53bef07510745afd60a0022eb97 /sys/kern
parent6169e2ea404ce2bf18bfc5be2b827a052b87ab17 (diff)
downloadFreeBSD-src-b1293d942048743241fdb7f3984117450c2ce046.zip
FreeBSD-src-b1293d942048743241fdb7f3984117450c2ce046.tar.gz
Use LIST_EMPTY() instead of unrolled version (LIST_FIRST() [!=]= NULL)
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_bio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index cb7d16f..5b5302d 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) {
OpenPOWER on IntegriCloud