From: Chaskiel M Grundman Date: Sat, 25 Jan 2003 18:41:14 +0000 (+0000) Subject: STABLE12-darwin-deal-with-unclean-pages-from-vm-20020107 X-Git-Tag: openafs-stable-1_2_9~70 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b7c5c4dd480b05575fabaa4600dce811176324fc;p=packages%2Fo%2Fopenafs.git STABLE12-darwin-deal-with-unclean-pages-from-vm-20020107 based on report from lha@stacken.kth.se (cherry picked from commit 4b690db92f2098f332132996a11ff07322284802) --- diff --git a/src/afs/DARWIN/osi_vnodeops.c b/src/afs/DARWIN/osi_vnodeops.c index c44ddb98f..4b3a69b20 100644 --- a/src/afs/DARWIN/osi_vnodeops.c +++ b/src/afs/DARWIN/osi_vnodeops.c @@ -467,6 +467,11 @@ afs_vop_pagein(ap) } afs_BozonUnlock(&tvc->pvnLock, tvc); AFS_GUNLOCK(); + + /* Zero out rest of last page if there wasn't enough data in the file */ + if (code == 0 && auio.uio_resid > 0) + memset(aiov.iov_base, 0, auio.uio_resid); + kernel_upl_unmap(kernel_map, pl); if (!nocommit) { if (code)