mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +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:
parent
175e78e50f
commit
69f51d1533
3 changed files with 2 additions and 43 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue