From: Jeffrey Altman Date: Thu, 9 Jan 2014 14:58:56 +0000 (-0500) Subject: Windows: AFSCommonWrite STATUS_PENDING is Success X-Git-Tag: upstream/1.8.0_pre1^2~857 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2d5f0a971baa05fc1a79726265a8235a0ebca4c0;p=packages%2Fo%2Fopenafs.git Windows: AFSCommonWrite STATUS_PENDING is Success AFSCommonWrite() can return STATUS_PENDING if the write has been deferred. In that case, the function exit must not: * Update the Valid Data Length * Purge the cache * or do anything else related to the request Change-Id: Ib34bef3a1d56d452babcaf1f3cfbf77fe8f93388 Reviewed-on: http://gerrit.openafs.org/10685 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp b/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp index 141fccd97..375b101b5 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp @@ -752,7 +752,8 @@ try_exit: Irp, ntStatus)); - if ( NT_SUCCESS( ntStatus)) + if ( NT_SUCCESS( ntStatus) && + ntStatus != STATUS_PENDING) { if ( !bPagingIo) { @@ -784,7 +785,8 @@ try_exit: } } - if ( !bPagingIo && bNonCachedIo && CcIsFileCached( pFileObject) && + if ( ntStatus != STATUS_PENDING && + !bPagingIo && bNonCachedIo && CcIsFileCached( pFileObject) && pNPFcb->SectionObjectPointers.DataSectionObject != NULL && bReleaseSectionObject) {