mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +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
|
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
|
#ifdef KDBG
|
||||||
pFcb->Flags |= FCB_CLOSED;
|
pFcb->Flags |= FCB_CLOSED;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,6 +37,7 @@ vfatFCBInitializeCacheFromVolume(
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(vfatFCBIsDirectory(fcb));
|
ASSERT(vfatFCBIsDirectory(fcb));
|
||||||
|
ASSERT(fcb->FileObject == NULL);
|
||||||
|
|
||||||
Acquired = FALSE;
|
Acquired = FALSE;
|
||||||
if (!ExIsResourceAcquiredExclusive(&vcb->DirResource))
|
if (!ExIsResourceAcquiredExclusive(&vcb->DirResource))
|
||||||
|
|
Loading…
Reference in a new issue