diff options
author | dyson <dyson@FreeBSD.org> | 1998-03-27 06:48:24 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1998-03-27 06:48:24 +0000 |
commit | 1eaa978a478cdf6768e93ba276482ac8140c290d (patch) | |
tree | 14970e8e50e7c28ec2128a968642285aef26e5f7 | |
parent | e16baaddc6756cfe1c23e1bf8622cac2c7d10193 (diff) | |
download | FreeBSD-src-1eaa978a478cdf6768e93ba276482ac8140c290d.zip FreeBSD-src-1eaa978a478cdf6768e93ba276482ac8140c290d.tar.gz |
Correct a problem where buffers might not be zeroed when needed. The
B_MALLOC buffers might not have been properly zeroed.
-rw-r--r-- | sys/kern/vfs_bio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 8e76be0..ea0f603 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.158 1998/03/17 17:36:05 dyson Exp $ + * $Id: vfs_bio.c,v 1.159 1998/03/19 22:48:12 dyson Exp $ */ /* @@ -2293,8 +2293,7 @@ vfs_clean_pages(struct buf * bp) void vfs_bio_clrbuf(struct buf *bp) { int i; - if (((bp->b_flags & (B_VMIO | B_MALLOC)) == B_VMIO) || - ((bp->b_flags & (B_VMIO | B_MALLOC)) == 0) && (bp->b_npages > 0) ) { + if ((bp->b_flags & (B_VMIO | B_MALLOC)) == B_VMIO) { if( (bp->b_npages == 1) && (bp->b_bufsize < PAGE_SIZE)) { int mask; mask = 0; @@ -2362,6 +2361,7 @@ tryagain: } vm_page_wire(p); p->valid = VM_PAGE_BITS_ALL; + p->flags &= ~PG_ZERO; pmap_kenter(pg, VM_PAGE_TO_PHYS(p)); bp->b_pages[index] = p; PAGE_WAKEUP(p); |