https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6a3bbf24e012e4985b97c…
commit 6a3bbf24e012e4985b97ca4d79604c28fe0133d7
Author: David Quintana <gigaherz(a)gmail.com>
AuthorDate: Fri Nov 24 18:15:42 2017 +0100
    Revert "[CDFS_NEW] Use CdAcquireForCreateSection from the old driver in place of
the newer CdFilterCallbackAcquireForCreateSection."
    This reverts commit 8410d0327522b51be9926994ce2ec0263d36310f.
---
 drivers/filesystems/cdfs_new/cdinit.c   |  6 ----
 drivers/filesystems/cdfs_new/cdprocs.h  |  8 -----
 drivers/filesystems/cdfs_new/resrcsup.c | 54 ---------------------------------
 3 files changed, 68 deletions(-)
diff --git a/drivers/filesystems/cdfs_new/cdinit.c b/drivers/filesystems/cdfs_new/cdinit.c
index d9c96db04f..871419ac57 100755
--- a/drivers/filesystems/cdfs_new/cdinit.c
+++ b/drivers/filesystems/cdfs_new/cdinit.c
@@ -191,9 +191,7 @@ Return Value:
                    sizeof(FS_FILTER_CALLBACKS) );
     FilterCallbacks.SizeOfFsFilterCallbacks = sizeof(FS_FILTER_CALLBACKS);
-#ifndef __REACTOS__
     FilterCallbacks.PreAcquireForSectionSynchronization =
CdFilterCallbackAcquireForCreateSection;
-#endif
     Status = FsRtlRegisterFileSystemFilterCallbacks( DriverObject,
                                                      &FilterCallbacks );
@@ -359,15 +357,11 @@ Return Value:
     CdFastIoDispatch.FastIoUnlockSingle =      CdFastUnlockSingle;       //  UnlockSingle
     CdFastIoDispatch.FastIoUnlockAll =         CdFastUnlockAll;          //  UnlockAll
     CdFastIoDispatch.FastIoUnlockAllByKey =    CdFastUnlockAllByKey;     //
UnlockAllByKey
-#ifndef __REACTOS__
     //
     //  This callback has been replaced by CdFilterCallbackAcquireForCreateSection.
     //
     CdFastIoDispatch.AcquireFileForNtCreateSection =  NULL;
-#else
-    CdFastIoDispatch.AcquireFileForNtCreateSection =  CdAcquireForCreateSection;
-#endif
     CdFastIoDispatch.ReleaseFileForNtCreateSection =  CdReleaseForCreateSection;
     CdFastIoDispatch.FastIoQueryNetworkOpenInfo =     CdFastQueryNetworkInfo;   //
QueryNetworkInfo
diff --git a/drivers/filesystems/cdfs_new/cdprocs.h
b/drivers/filesystems/cdfs_new/cdprocs.h
index 6506b233cb..6c957aebba 100755
--- a/drivers/filesystems/cdfs_new/cdprocs.h
+++ b/drivers/filesystems/cdfs_new/cdprocs.h
@@ -1121,7 +1121,6 @@ CdReleaseFromCache (
     _Inout_ PFCB Fcb
     );
-#ifndef __REACTOS__
 _Requires_lock_held_(_Global_critical_region_)
 NTSTATUS
 NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
@@ -1129,13 +1128,6 @@ CdFilterCallbackAcquireForCreateSection (
     _In_ PFS_FILTER_CALLBACK_DATA CallbackData,
     _Unreferenced_parameter_ PVOID *CompletionContext
     );
-#else
-VOID
-NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
-CdAcquireForCreateSection (
-    IN PFILE_OBJECT FileObject
-    );
-#endif
 _Function_class_(FAST_IO_RELEASE_FILE)
 _Requires_lock_held_(_Global_critical_region_)
diff --git a/drivers/filesystems/cdfs_new/resrcsup.c
b/drivers/filesystems/cdfs_new/resrcsup.c
index 0e7ebd9d30..c9eaa7be26 100755
--- a/drivers/filesystems/cdfs_new/resrcsup.c
+++ b/drivers/filesystems/cdfs_new/resrcsup.c
@@ -23,11 +23,7 @@ Abstract:
 #ifdef ALLOC_PRAGMA
 #pragma alloc_text(PAGE, CdAcquireForCache)
-#ifndef __REACTOS__
 #pragma alloc_text(PAGE, CdFilterCallbackAcquireForCreateSection)
-#else
-#pragma alloc_text(PAGE, CdAcquireForCreateSection)
-#endif
 #pragma alloc_text(PAGE, CdAcquireResource)
 #pragma alloc_text(PAGE, CdNoopAcquire)
 #pragma alloc_text(PAGE, CdNoopRelease)
@@ -278,7 +274,6 @@ Return Value:
 }
-#ifndef __REACTOS__
 _Requires_lock_held_(_Global_critical_region_)
 NTSTATUS
 NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
@@ -361,55 +356,6 @@ Return Value:
     UNREFERENCED_PARAMETER( CompletionContext );
 }
-#else
-VOID
-NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
-CdAcquireForCreateSection (
-    IN PFILE_OBJECT FileObject
-    )
-
-/*++
-
-Routine Description:
-
-    This is the callback routine for MM to use to acquire the file exclusively.
-
-Arguments:
-
-    FileObject - File object for a Cdfs stream.
-
-Return Value:
-
-    None
-
---*/
-
-{
-    PAGED_CODE();
-
-
-    //
-    //  Get the Fcb resource exclusively.
-    //
-
-    ExAcquireResourceExclusiveLite( &((PFCB)
FileObject->FsContext)->FcbNonpaged->FcbResource,
-                                TRUE );
-
-    //
-    //  Take the File resource shared.  We need this later on when MM calls
-    //  QueryStandardInfo to get the file size.
-    //
-    //  If we don't use StarveExclusive,  then we can get wedged behind an
-    //  exclusive waiter who is waiting on someone else holding it shared in the
-    //  read->initializecachemap path (which calls createsection) who is in turn
-    //  waiting on us to finish the create section.
-    //
-
-    ExAcquireSharedStarveExclusive( ((PFCB) FileObject->FsContext)->Resource,
-                                    TRUE );
-}
-#endif
-
 _Function_class_(FAST_IO_RELEASE_FILE)