mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[FASTFAT] Uninit directory cache on last handle close.
CORE-14629 CORE-14557
This commit is contained in:
parent
3c3ebe3320
commit
a837694518
2 changed files with 14 additions and 0 deletions
|
@ -48,6 +48,19 @@ VfatCloseFile(
|
|||
}
|
||||
else
|
||||
{
|
||||
if (pFcb->OpenHandleCount == 0 && BooleanFlagOn(pFcb->Flags, FCB_CACHE_INITIALIZED))
|
||||
{
|
||||
PFILE_OBJECT tmpFileObject;
|
||||
tmpFileObject = pFcb->FileObject;
|
||||
if (tmpFileObject != NULL)
|
||||
{
|
||||
pFcb->FileObject = NULL;
|
||||
CcUninitializeCacheMap(tmpFileObject, NULL, NULL);
|
||||
ClearFlag(pFcb->Flags, FCB_CACHE_INITIALIZED);
|
||||
ObDereferenceObject(tmpFileObject);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef KDBG
|
||||
pFcb->Flags |= FCB_CLOSED;
|
||||
#endif
|
||||
|
|
|
@ -37,6 +37,7 @@ vfatFCBInitializeCacheFromVolume(
|
|||
}
|
||||
|
||||
ASSERT(vfatFCBIsDirectory(fcb));
|
||||
ASSERT(fcb->FileObject == NULL);
|
||||
|
||||
Acquired = FALSE;
|
||||
if (!ExIsResourceAcquiredExclusive(&vcb->DirResource))
|
||||
|
|
Loading…
Reference in a new issue