Windows: Strip out unused ModWriter Fastio code
authorRod Widdowson <rdw@your-file-system.com>
Sun, 25 Aug 2013 20:20:28 +0000 (13:20 -0700)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 30 Aug 2013 19:12:20 +0000 (12:12 -0700)
The code is no longer used (the fcb->PagingIO resource is taken for
us by the modwriter) so we strip it out to save other making changes
and then remembering/discovering that this code isn't being used.

Change-Id: I0d880049758559ae0860f8c1e12583304a459a68
Reviewed-on: http://gerrit.openafs.org/10191
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/kernel/fs/AFSFastIoSupport.cpp
src/WINNT/afsrdr/kernel/fs/AFSInit.cpp
src/WINNT/afsrdr/kernel/fs/Include/AFSCommon.h

index 8f9ccac..846ef62 100644 (file)
@@ -442,61 +442,6 @@ AFSFastIoMdlWriteComplete( IN struct _FILE_OBJECT *FileObject,
 }
 
 NTSTATUS
-AFSFastIoAcquireForModWrite( IN struct _FILE_OBJECT *FileObject,
-                             IN PLARGE_INTEGER EndingOffset,
-                             OUT struct _ERESOURCE **ResourceToRelease,
-                             IN struct _DEVICE_OBJECT *DeviceObject)
-{
-    UNREFERENCED_PARAMETER(DeviceObject);
-    UNREFERENCED_PARAMETER(EndingOffset);
-
-    NTSTATUS ntStatus = STATUS_FILE_LOCK_CONFLICT;
-    AFSFcb *pFcb = (AFSFcb *)FileObject->FsContext;
-
-    __Enter
-    {
-
-        if( AFSAcquireExcl( &pFcb->NPFcb->Resource,
-                            BooleanFlagOn( FileObject->Flags, FO_SYNCHRONOUS_IO)))
-        {
-
-            AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
-                          AFS_TRACE_LEVEL_VERBOSE,
-                          "AFSFastIoAcquireForModWrite Acquired Fcb SectionObject lock %p EXCL %08lX\n",
-                          &pFcb->NPFcb->SectionObjectResource,
-                          PsGetCurrentThread()));
-
-            ntStatus = STATUS_SUCCESS;
-
-            *ResourceToRelease = &pFcb->NPFcb->SectionObjectResource;
-        }
-    }
-
-    return ntStatus;
-}
-
-NTSTATUS
-AFSFastIoReleaseForModWrite( IN struct _FILE_OBJECT *FileObject,
-                             IN struct _ERESOURCE *ResourceToRelease,
-                             IN struct _DEVICE_OBJECT *DeviceObject)
-{
-    UNREFERENCED_PARAMETER(FileObject);
-    UNREFERENCED_PARAMETER(DeviceObject);
-
-    NTSTATUS ntStatus = STATUS_SUCCESS;
-
-    AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
-                  AFS_TRACE_LEVEL_VERBOSE,
-                  "AFSFastIoReleaseForModWrite Releasing lock %p EXCL %08lX\n",
-                  ResourceToRelease,
-                  PsGetCurrentThread()));
-
-    AFSReleaseResource( ResourceToRelease);
-
-    return ntStatus;
-}
-
-NTSTATUS
 AFSFastIoAcquireForCCFlush( IN struct _FILE_OBJECT *FileObject,
                             IN struct _DEVICE_OBJECT *DeviceObject)
 {
index 25e11b0..a2631f3 100644 (file)
@@ -393,8 +393,6 @@ DriverEntry( PDRIVER_OBJECT DriverObject,
         AFSFastIoDispatch.AcquireFileForNtCreateSection = AFSFastIoAcquireFile;
         AFSFastIoDispatch.ReleaseFileForNtCreateSection = AFSFastIoReleaseFile;
         AFSFastIoDispatch.FastIoDetachDevice           = AFSFastIoDetachDevice;
-        //AFSFastIoDispatch.AcquireForModWrite           = AFSFastIoAcquireForModWrite;
-        //AFSFastIoDispatch.ReleaseForModWrite           = AFSFastIoReleaseForModWrite;
         AFSFastIoDispatch.MdlRead                      = AFSFastIoMdlRead;
         AFSFastIoDispatch.MdlReadComplete              = AFSFastIoMdlReadComplete;
         AFSFastIoDispatch.PrepareMdlWrite              = AFSFastIoPrepareMdlWrite;
index 55ab756..e1bc47b 100644 (file)
@@ -659,17 +659,6 @@ AFSFastIoMdlWriteComplete( IN struct _FILE_OBJECT *FileObject,
                            IN struct _DEVICE_OBJECT *DeviceObject);
 
 NTSTATUS
-AFSFastIoAcquireForModWrite( IN struct _FILE_OBJECT *FileObject,
-                             IN PLARGE_INTEGER EndingOffset,
-                             OUT struct _ERESOURCE **ResourceToRelease,
-                             IN struct _DEVICE_OBJECT *DeviceObject);
-
-NTSTATUS
-AFSFastIoReleaseForModWrite( IN struct _FILE_OBJECT *FileObject,
-                             IN struct _ERESOURCE *ResourceToRelease,
-                             IN struct _DEVICE_OBJECT *DeviceObject);
-
-NTSTATUS
 AFSFastIoAcquireForCCFlush( IN struct _FILE_OBJECT *FileObject,
                             IN struct _DEVICE_OBJECT *DeviceObject);