[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:
Pierre Schweitzer 2018-02-17 13:48:32 +01:00
parent 175e78e50f
commit 69f51d1533
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
3 changed files with 2 additions and 43 deletions

View file

@ -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(

View file

@ -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);

View file

@ -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