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 <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
Jeffrey Altman 2014-01-09 09:57:33 -05:00
parent 6995a56884
commit d5bcff7429

View File

@ -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()) )