https://git.reactos.org/?p=reactos.git;a=commitdiff;h=69f51d153394c8b2223ff…
commit 69f51d153394c8b2223ffa3b92805dffe45f0673
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Feb 17 13:48:32 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sat Feb 17 13:49:15 2018 +0100
[FASTFAT] Drop read ahead locking routines in favor of lazy writer routines.
This avoids code duplication while being consistent with MS FastFAT.
---
drivers/filesystems/fastfat/fastio.c | 30 ------------------------------
drivers/filesystems/fastfat/iface.c | 4 ++--
drivers/filesystems/fastfat/vfat.h | 11 -----------
3 files changed, 2 insertions(+), 43 deletions(-)
diff --git a/drivers/filesystems/fastfat/fastio.c b/drivers/filesystems/fastfat/fastio.c
index 58d3f0d587..248f39f5bf 100644
--- a/drivers/filesystems/fastfat/fastio.c
+++ b/drivers/filesystems/fastfat/fastio.c
@@ -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(
diff --git a/drivers/filesystems/fastfat/iface.c b/drivers/filesystems/fastfat/iface.c
index c334a95aed..02e570ea45 100644
--- a/drivers/filesystems/fastfat/iface.c
+++ b/drivers/filesystems/fastfat/iface.c
@@ -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);
diff --git a/drivers/filesystems/fastfat/vfat.h b/drivers/filesystems/fastfat/vfat.h
index f6e2aa6452..487b5f9ab2 100644
--- a/drivers/filesystems/fastfat/vfat.h
+++ b/drivers/filesystems/fastfat/vfat.h
@@ -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