From d5bcff7429dd9972b17055a9abd98f3a590dee68 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 9 Jan 2014 09:57:33 -0500 Subject: [PATCH] Windows: Mark Irp Pending before Deferring After CcDeferWrite() is called we no longer have access to the current Irp. If we mark it deferred after calling CcDeferWrite() we might mark the wrong thing. Change-Id: Id4b1bbd241b5e2acafc8d015e85966cb80518dde Reviewed-on: http://gerrit.openafs.org/10684 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp b/src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp index ed912c394d..53354138a9 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp @@ -2750,10 +2750,10 @@ AFSDeferWrite( IN PDEVICE_OBJECT DeviceObject, __FUNCTION__, pWorkItem)); - CcDeferWrite( FileObject, AFSPostedDeferredWrite, pWorkItem, NULL, BytesToWrite, bRetrying); - IoMarkIrpPending(Irp); + CcDeferWrite( FileObject, AFSPostedDeferredWrite, pWorkItem, NULL, BytesToWrite, bRetrying); + ntStatus = STATUS_PENDING; } __except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )