From 6136b236c4ac1b63531665862701d0e2d2916d35 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 18 Feb 2013 10:34:59 -0500 Subject: [PATCH] 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 --- src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp b/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp index 05bf857113..500c3c7b2e 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,