- Update to r53061
[reactos.git] / drivers / filesystems / fastfat / cleanup.c
index 88e441e..f05c116 100644 (file)
@@ -84,11 +84,10 @@ VfatCleanupFile(PVFAT_IRP_CONTEXT IrpContext)
 
            CcPurgeCacheSection(FileObject->SectionObjectPointer, NULL, 0, FALSE);
         }
-        /* Uninitialize file cache if. */
-        if (FileObject->SectionObjectPointer->SharedCacheMap)
-        {
-            CcUninitializeCacheMap (FileObject, &pFcb->RFCB.FileSize, NULL);
-        }
+
+        /* Uninitialize the cache (should be done even if caching was never initialized) */
+        CcUninitializeCacheMap(FileObject, &pFcb->RFCB.FileSize, NULL);
+
         if (pFcb->OpenHandleCount != 0)
         {
             IoRemoveShareAccess(FileObject, &pFcb->FCBShareAccess);