Skip to content

Commit 6a3bbf2

Browse files
gigaherzHeisSpiter
authored andcommitted
Revert "[CDFS_NEW] Use CdAcquireForCreateSection from the old driver in place of the newer CdFilterCallbackAcquireForCreateSection."
This reverts commit 8410d03.
1 parent ec26cde commit 6a3bbf2

File tree

3 files changed

+0
-68
lines changed

3 files changed

+0
-68
lines changed

drivers/filesystems/cdfs_new/cdinit.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ Return Value:
191191
sizeof(FS_FILTER_CALLBACKS) );
192192

193193
FilterCallbacks.SizeOfFsFilterCallbacks = sizeof(FS_FILTER_CALLBACKS);
194-
#ifndef __REACTOS__
195194
FilterCallbacks.PreAcquireForSectionSynchronization = CdFilterCallbackAcquireForCreateSection;
196-
#endif
197195

198196
Status = FsRtlRegisterFileSystemFilterCallbacks( DriverObject,
199197
&FilterCallbacks );
@@ -359,15 +357,11 @@ Return Value:
359357
CdFastIoDispatch.FastIoUnlockSingle = CdFastUnlockSingle; // UnlockSingle
360358
CdFastIoDispatch.FastIoUnlockAll = CdFastUnlockAll; // UnlockAll
361359
CdFastIoDispatch.FastIoUnlockAllByKey = CdFastUnlockAllByKey; // UnlockAllByKey
362-
#ifndef __REACTOS__
363360
//
364361
// This callback has been replaced by CdFilterCallbackAcquireForCreateSection.
365362
//
366363

367364
CdFastIoDispatch.AcquireFileForNtCreateSection = NULL;
368-
#else
369-
CdFastIoDispatch.AcquireFileForNtCreateSection = CdAcquireForCreateSection;
370-
#endif
371365
CdFastIoDispatch.ReleaseFileForNtCreateSection = CdReleaseForCreateSection;
372366
CdFastIoDispatch.FastIoQueryNetworkOpenInfo = CdFastQueryNetworkInfo; // QueryNetworkInfo
373367

drivers/filesystems/cdfs_new/cdprocs.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,21 +1121,13 @@ CdReleaseFromCache (
11211121
_Inout_ PFCB Fcb
11221122
);
11231123

1124-
#ifndef __REACTOS__
11251124
_Requires_lock_held_(_Global_critical_region_)
11261125
NTSTATUS
11271126
NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
11281127
CdFilterCallbackAcquireForCreateSection (
11291128
_In_ PFS_FILTER_CALLBACK_DATA CallbackData,
11301129
_Unreferenced_parameter_ PVOID *CompletionContext
11311130
);
1132-
#else
1133-
VOID
1134-
NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
1135-
CdAcquireForCreateSection (
1136-
IN PFILE_OBJECT FileObject
1137-
);
1138-
#endif
11391131

11401132
_Function_class_(FAST_IO_RELEASE_FILE)
11411133
_Requires_lock_held_(_Global_critical_region_)

drivers/filesystems/cdfs_new/resrcsup.c

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ Module Name:
2323

2424
#ifdef ALLOC_PRAGMA
2525
#pragma alloc_text(PAGE, CdAcquireForCache)
26-
#ifndef __REACTOS__
2726
#pragma alloc_text(PAGE, CdFilterCallbackAcquireForCreateSection)
28-
#else
29-
#pragma alloc_text(PAGE, CdAcquireForCreateSection)
30-
#endif
3127
#pragma alloc_text(PAGE, CdAcquireResource)
3228
#pragma alloc_text(PAGE, CdNoopAcquire)
3329
#pragma alloc_text(PAGE, CdNoopRelease)
@@ -278,7 +274,6 @@ Return Value:
278274
}
279275

280276

281-
#ifndef __REACTOS__
282277
_Requires_lock_held_(_Global_critical_region_)
283278
NTSTATUS
284279
NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
@@ -361,55 +356,6 @@ Return Value:
361356

362357
UNREFERENCED_PARAMETER( CompletionContext );
363358
}
364-
#else
365-
VOID
366-
NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
367-
CdAcquireForCreateSection (
368-
IN PFILE_OBJECT FileObject
369-
)
370-
371-
/*++
372-
373-
Routine Description:
374-
375-
This is the callback routine for MM to use to acquire the file exclusively.
376-
377-
Arguments:
378-
379-
FileObject - File object for a Cdfs stream.
380-
381-
Return Value:
382-
383-
None
384-
385-
--*/
386-
387-
{
388-
PAGED_CODE();
389-
390-
391-
//
392-
// Get the Fcb resource exclusively.
393-
//
394-
395-
ExAcquireResourceExclusiveLite( &((PFCB) FileObject->FsContext)->FcbNonpaged->FcbResource,
396-
TRUE );
397-
398-
//
399-
// Take the File resource shared. We need this later on when MM calls
400-
// QueryStandardInfo to get the file size.
401-
//
402-
// If we don't use StarveExclusive, then we can get wedged behind an
403-
// exclusive waiter who is waiting on someone else holding it shared in the
404-
// read->initializecachemap path (which calls createsection) who is in turn
405-
// waiting on us to finish the create section.
406-
//
407-
408-
ExAcquireSharedStarveExclusive( ((PFCB) FileObject->FsContext)->Resource,
409-
TRUE );
410-
}
411-
#endif
412-
413359

414360

415361
_Function_class_(FAST_IO_RELEASE_FILE)

0 commit comments

Comments
 (0)