summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-01-23 06:36:15 +0000
committerdillon <dillon@FreeBSD.org>1999-01-23 06:36:15 +0000
commitfcfddd9dee14ca6c781914fa60d2fc7cf5f6d5a2 (patch)
tree7f3cc8b196e8de490098bdb457e950054d8be2f4 /sys/kern/vfs_bio.c
parent3a81644d73d04a8d5fb2245a6f7746dff3a03161 (diff)
downloadFreeBSD-src-fcfddd9dee14ca6c781914fa60d2fc7cf5f6d5a2.zip
FreeBSD-src-fcfddd9dee14ca6c781914fa60d2fc7cf5f6d5a2.tar.gz
Fix an expression parenthesization typo in a conditional. It should not
have any operational effects other then to make the code in question a little faster. Also added a more involved comment.
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 5e57271..b09a6f2 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -11,7 +11,7 @@
* 2. Absolutely no warranty of function or purpose is made by the author
* John S. Dyson.
*
- * $Id: vfs_bio.c,v 1.195 1999/01/21 09:19:33 dillon Exp $
+ * $Id: vfs_bio.c,v 1.196 1999/01/22 08:59:05 dg Exp $
*/
/*
@@ -1473,8 +1473,16 @@ loop:
* contain fully valid pages. Normal (old-style) buffers
* should be fully valid. This might also lead to B_CACHE
* getting clear.
+ *
+ * If B_CACHE is already clear, don't bother checking to see
+ * if we have to clear it again.
+ *
+ * XXX this code should not be necessary unless the B_CACHE
+ * handling is broken elsewhere in the kernel. We need to
+ * check the cases and then turn the clearing part of this
+ * code into a panic.
*/
- if ((bp->b_flags & B_VMIO|B_CACHE) == (B_VMIO|B_CACHE)) {
+ if ((bp->b_flags & (B_VMIO|B_CACHE)) == (B_VMIO|B_CACHE)) {
int checksize = bp->b_bufsize;
int poffset = bp->b_offset & PAGE_MASK;
int resid;
OpenPOWER on IntegriCloud