only zero the part of the page after EOF if we're actually

initializing the page.
This commit is contained in:
chs 2000-12-09 22:38:23 +00:00
parent 1a0a12c5b4
commit f5878a3362
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: genfs_vnops.c,v 1.22 2000/11/27 18:26:38 chs Exp $ */
/* $NetBSD: genfs_vnops.c,v 1.23 2000/12/09 22:38:23 chs Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -638,7 +638,7 @@ genfs_getpages(v)
* if EOF is in the middle of the last page, zero the part past EOF.
*/
if (tailbytes > 0) {
if (tailbytes > 0 && (pgs[bytes >> PAGE_SHIFT]->flags & PG_FAKE)) {
memset((void *)(kva + bytes), 0, tailbytes);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_bio.c,v 1.55 2000/12/04 12:12:20 fvdl Exp $ */
/* $NetBSD: nfs_bio.c,v 1.56 2000/12/09 22:38:23 chs Exp $ */
/*
* Copyright (c) 1989, 1993
@ -1137,7 +1137,7 @@ nfs_getpages(v)
* if EOF is in the middle of the last page, zero the part past EOF.
*/
if (tailbytes > 0) {
if (tailbytes > 0 && (pgs[bytes >> PAGE_SHIFT]->flags & PG_FAKE)) {
memset((char *)kva + bytes, 0, tailbytes);
}