Windows: AFSProcessOverwriteSupersede CcSetFileSizes
authorPeter Scott <pscott@kerneldrivers.com>
Mon, 16 Apr 2012 16:25:01 +0000 (12:25 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 17 Apr 2012 01:36:40 +0000 (18:36 -0700)
commit8e1490f5799f0a307760047a133aade806b32afc
tree52266f5acf002732894c201a2f17ef223f720d03
parentf8b759b63ff938e2829fefd71059202c44e7ca13
Windows: AFSProcessOverwriteSupersede CcSetFileSizes

Instead of calling CcPurgeCacheSection() in AFSProcessOverwriteSupersede()
as part of the file length truncation to zero, call CcSetFileSizes().

Wait to call CcSetFileSizes() until after the Fcb->Resource has been
dropped but while the Fcb->Header.PagingIoResource is still held.
Make sure that file sizes are restored in the Fcb->Header if the
afsd_service rejects the file update.

Change-Id: I7574e80781ac1dbbe69814c69644bb3825de9b6a
Reviewed-on: http://gerrit.openafs.org/7220
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp