From 8393c48a22c2fd8c292e40af78d30fc773fec7d9 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Sat, 15 Jul 1995 16:01:46 +0000 Subject: [PATCH] Resize buffers if they aren't the correct size. Several months ago we made a change to NFS that caused buffers at EOF to be variable size. This had the undesired side-effect of breaking delayed writes on NFS. This fixes it. Submitted by: John Dyson --- sys/kern/vfs_bio.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 66f039dd2935..6a7d27d5f0bc 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.46 1995/05/30 08:06:27 rgrimes Exp $ + * $Id: vfs_bio.c,v 1.47 1995/06/28 12:00:54 davidg Exp $ */ /* @@ -835,12 +835,7 @@ loop: * check for size inconsistancies */ if (bp->b_bcount != size) { -#if defined(VFS_BIO_DEBUG) - printf("getblk: invalid buffer size: %ld\n", bp->b_bcount); -#endif - bp->b_flags |= B_NOCACHE; - (void) VOP_BWRITE(bp); - goto loop; + allocbuf(bp, size); } splx(s); return (bp);