From: Jeffrey Altman Date: Thu, 22 Dec 2011 02:08:59 +0000 (-0500) Subject: Windows: RDR_CleanupFileEntry restrict extent claw back X-Git-Tag: upstream/1.8.0_pre1^2~2916 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6cd09ca2e699d2f9817b897e7165fac60560adcc;p=packages%2Fo%2Fopenafs.git Windows: RDR_CleanupFileEntry restrict extent claw back Only demand that extents be returned by the afs redirector if this cleanup is the last open handle or the redirector has requested that the file be flushed to the file server. Change-Id: I03ddcd153d2ded5fc805148a192234742d20b29e Reviewed-on: http://gerrit.openafs.org/6394 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/user/RDRFunction.c b/src/WINNT/afsrdr/user/RDRFunction.c index d822abf70..89f0478b3 100644 --- a/src/WINNT/afsrdr/user/RDRFunction.c +++ b/src/WINNT/afsrdr/user/RDRFunction.c @@ -1734,7 +1734,9 @@ RDR_CleanupFileEntry( IN cm_user_t *userp, } cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS); - if (scp->redirBufCount > 0) { + if ((bLastHandle || bFlushFile) && + scp->redirBufCount > 0) + { LARGE_INTEGER heldExtents; AFSFileExtentCB extentList[1024]; DWORD extentCount = 0;