mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-01 00:18:15 +01:00
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
This commit is contained in:
parent
90bec1c3cf
commit
8393c48a22
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9530
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user