From 2d5f0a971baa05fc1a79726265a8235a0ebca4c0 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 9 Jan 2014 09:58:56 -0500 Subject: [PATCH] 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 --- src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp b/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp index 141fccd970..375b101b5f 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) {