mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[FASTFAT] Drop read ahead locking routines in favor of lazy writer routines.
This avoids code duplication while being consistent with MS FastFAT.
This commit is contained in:
@@ -753,36 +753,6 @@ VfatReleaseFromLazyWrite(
|
||||
ExReleaseResourceLite(&(Fcb->MainResource));
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
VfatAcquireForReadAhead(
|
||||
IN PVOID Context,
|
||||
IN BOOLEAN Wait)
|
||||
{
|
||||
PVFATFCB Fcb = (PVFATFCB)Context;
|
||||
ASSERT(Fcb);
|
||||
DPRINT("VfatAcquireForReadAhead(): Fcb %p\n", Fcb);
|
||||
|
||||
if (!ExAcquireResourceExclusiveLite(&(Fcb->MainResource), Wait))
|
||||
{
|
||||
DPRINT("VfatAcquireForReadAhead(): ExReleaseResourceLite failed.\n");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
VfatReleaseFromReadAhead(
|
||||
IN PVOID Context)
|
||||
{
|
||||
PVFATFCB Fcb = (PVFATFCB)Context;
|
||||
ASSERT(Fcb);
|
||||
DPRINT("VfatReleaseFromReadAhead(): Fcb %p\n", Fcb);
|
||||
|
||||
ExReleaseResourceLite(&(Fcb->MainResource));
|
||||
}
|
||||
|
||||
INIT_SECTION
|
||||
VOID
|
||||
VfatInitFastIoRoutines(
|
||||
|
||||
@@ -119,8 +119,8 @@ DriverEntry(
|
||||
/* Cache manager */
|
||||
VfatGlobalData->CacheMgrCallbacks.AcquireForLazyWrite = VfatAcquireForLazyWrite;
|
||||
VfatGlobalData->CacheMgrCallbacks.ReleaseFromLazyWrite = VfatReleaseFromLazyWrite;
|
||||
VfatGlobalData->CacheMgrCallbacks.AcquireForReadAhead = VfatAcquireForReadAhead;
|
||||
VfatGlobalData->CacheMgrCallbacks.ReleaseFromReadAhead = VfatReleaseFromReadAhead;
|
||||
VfatGlobalData->CacheMgrCallbacks.AcquireForReadAhead = VfatAcquireForLazyWrite;
|
||||
VfatGlobalData->CacheMgrCallbacks.ReleaseFromReadAhead = VfatReleaseFromLazyWrite;
|
||||
|
||||
/* Fast I/O */
|
||||
VfatInitFastIoRoutines(&VfatGlobalData->FastIoDispatch);
|
||||
|
||||
@@ -775,17 +775,6 @@ NTAPI
|
||||
VfatReleaseFromLazyWrite(
|
||||
IN PVOID Context);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
VfatAcquireForReadAhead(
|
||||
IN PVOID Context,
|
||||
IN BOOLEAN Wait);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
VfatReleaseFromReadAhead(
|
||||
IN PVOID Context);
|
||||
|
||||
/* fat.c */
|
||||
|
||||
NTSTATUS
|
||||
|
||||
Reference in New Issue
Block a user