summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2001-04-17 20:22:07 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2001-04-17 20:22:07 +0000
commit0dfba3cef13b285bd8ff4cd8f9c9b004571db54b (patch)
tree2c4dc2161dd7351e6d8aaebf358b49851f976192
parent07eb2bbb9cc0ec2771473cbf28ab81ee4c0b7ecf (diff)
Notes
-rw-r--r--sys/kern/vfs_bio.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 87a17a8a7eee..316cef65a840 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1210,24 +1210,14 @@ brelse(struct buf * bp)
/* remaining buffers */
} else {
- switch(bp->b_flags & (B_DELWRI|B_AGE)) {
- case B_DELWRI | B_AGE:
- bp->b_qindex = QUEUE_DIRTY;
- TAILQ_INSERT_HEAD(&bufqueues[QUEUE_DIRTY], bp, b_freelist);
- break;
- case B_DELWRI:
- bp->b_qindex = QUEUE_DIRTY;
- TAILQ_INSERT_TAIL(&bufqueues[QUEUE_DIRTY], bp, b_freelist);
- break;
- case B_AGE:
- bp->b_qindex = QUEUE_CLEAN;
- TAILQ_INSERT_HEAD(&bufqueues[QUEUE_CLEAN], bp, b_freelist);
- break;
- default:
- bp->b_qindex = QUEUE_CLEAN;
- TAILQ_INSERT_TAIL(&bufqueues[QUEUE_CLEAN], bp, b_freelist);
- break;
- }
+ if (bp->b_flags & B_DELWRI)
+ bp->b_qindex = QUEUE_DIRTY;
+ else
+ bp->b_qindex = QUEUE_CLEAN;
+ if (bp->b_flags & B_AGE)
+ TAILQ_INSERT_HEAD(&bufqueues[bp->b_qindex], bp, b_freelist);
+ else
+ TAILQ_INSERT_TAIL(&bufqueues[bp->b_qindex], bp, b_freelist);
}
/*