From: Jeffrey Altman Date: Mon, 18 Feb 2013 15:34:59 +0000 (-0500) Subject: Windows: Initialize Irp->IoStatus.Information earlier X-Git-Tag: upstream/1.8.0_pre1^2~1489 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6136b236c4ac1b63531665862701d0e2d2916d35;p=packages%2Fo%2Fopenafs.git Windows: Initialize Irp->IoStatus.Information earlier Initialize Irp->IoStatus.Information to zero immediately upon beginning processing of the IRP in the write path. Change-Id: I8d5a717ae8cd3bc44c2a9a65b34fd0549862d293 Reviewed-on: http://gerrit.openafs.org/9128 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp b/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp index 05bf85711..500c3c7b2 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp @@ -123,6 +123,8 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject, __Enter { + Irp->IoStatus.Information = 0; + pFileObject = pIrpSp->FileObject; // @@ -290,8 +292,6 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject, "AFSCommonWrite (%p) Failing request due to INVALID fcb\n", Irp); - Irp->IoStatus.Information = 0; - try_return( ntStatus = STATUS_FILE_DELETED); } @@ -755,6 +755,8 @@ AFSIOCtlWrite( IN PDEVICE_OBJECT DeviceObject, __Enter { + Irp->IoStatus.Information = 0; + RtlZeroMemory( &stIORequestCB, sizeof( AFSPIOCtlIORequestCB)); @@ -914,7 +916,6 @@ AFSNonCachedWrite( IN PDEVICE_OBJECT DeviceObject, __Enter { - Irp->IoStatus.Information = 0; AFSDbgLogMsg( AFS_SUBSYSTEM_IO_PROCESSING, AFS_TRACE_LEVEL_VERBOSE,