mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
- Always try to uninitialize the file cache in VfatCleanupFile.
- Try to purge the file cache if the last handle is closed and deleting of the file was requested. svn path=/trunk/; revision=13276
This commit is contained in:
parent
afec493812
commit
4240c717c7
1 changed files with 13 additions and 7 deletions
|
@ -46,16 +46,22 @@ VfatCleanupFile(PVFAT_IRP_CONTEXT IrpContext)
|
|||
VfatUpdateEntry (pFcb);
|
||||
}
|
||||
|
||||
/* Uninitialize file cache if initialized for this file object. */
|
||||
if (FileObject->PrivateCacheMap)
|
||||
if (pFcb->Flags & FCB_DELETE_PENDING &&
|
||||
pFcb->OpenHandleCount == 1)
|
||||
{
|
||||
#ifdef USE_ROS_CC_AND_FS
|
||||
CcRosReleaseFileCache (FileObject);
|
||||
#else
|
||||
CcUninitializeCacheMap (FileObject, NULL, NULL);
|
||||
#if 0
|
||||
/* FIXME:
|
||||
* CcPurgeCacheSection is unimplemented.
|
||||
*/
|
||||
CcPurgeCacheSection(FileObject->SectionObjectPointer, NULL, 0, FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Uninitialize file cache if. */
|
||||
#ifdef USE_ROS_CC_AND_FS
|
||||
CcRosReleaseFileCache (FileObject);
|
||||
#else
|
||||
CcUninitializeCacheMap (FileObject, NULL, NULL);
|
||||
#endif
|
||||
pFcb->OpenHandleCount--;
|
||||
IoRemoveShareAccess(FileObject, &pFcb->FCBShareAccess);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue