summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1995-10-19 23:48:25 +0000
committerdyson <dyson@FreeBSD.org>1995-10-19 23:48:25 +0000
commitdc58fb65bda5943581853112c9762c96a1eb3f9c (patch)
treeb34e0920c57f7b68e2fcbadc3fdb688465da04b5
parent61860c0e91f59ef9bb1bf9bfcbf0a3819bdac63c (diff)
downloadFreeBSD-src-dc58fb65bda5943581853112c9762c96a1eb3f9c.zip
FreeBSD-src-dc58fb65bda5943581853112c9762c96a1eb3f9c.tar.gz
If we clear the B_CACHE flag because a buffer isn't composed fully of
valid bytes, we must also clear the B_DONE flag. Some filesystems depend on this (incl NFS) and is probably the cause of the biodone error and subsequent crash. Anyway this change needs to be made.
-rw-r--r--sys/kern/vfs_bio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 832918f..d9c644c 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -18,7 +18,7 @@
* 5. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: vfs_bio.c,v 1.65 1995/10/01 05:50:27 davidg Exp $
+ * $Id: vfs_bio.c,v 1.66 1995/10/08 00:06:08 swallace Exp $
*/
/*
@@ -915,7 +915,7 @@ loop:
if (szleft > PAGE_SIZE) {
if ((bp->b_pages[i]->valid & VM_PAGE_BITS_ALL) !=
VM_PAGE_BITS_ALL) {
- bp->b_flags &= ~B_CACHE;
+ bp->b_flags &= ~(B_CACHE|B_DONE);
break;
}
szleft -= PAGE_SIZE;
@@ -923,7 +923,7 @@ loop:
if (!vm_page_is_valid(bp->b_pages[i],
(((vm_offset_t) bp->b_data) & PAGE_MASK),
szleft)) {
- bp->b_flags &= ~B_CACHE;
+ bp->b_flags &= ~(B_CACHE|B_DONE);
break;
}
szleft = 0;
OpenPOWER on IntegriCloud