[NTOS:CC]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 17 Aug 2014 21:52:54 +0000 (21:52 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 17 Aug 2014 21:52:54 +0000 (21:52 +0000)
- Set the uninitialize event in CcUninitializeCacheMap to avoid deadlocking callers

svn path=/trunk/; revision=63902

reactos/ntoskrnl/cc/fs.c

index b4c3b1d..489e513 100644 (file)
@@ -235,12 +235,12 @@ CcUninitializeCacheMap (
     IN PLARGE_INTEGER TruncateSize OPTIONAL,
     IN PCACHE_UNINITIALIZE_EVENT UninitializeCompleteEvent OPTIONAL)
 {
     IN PLARGE_INTEGER TruncateSize OPTIONAL,
     IN PCACHE_UNINITIALIZE_EVENT UninitializeCompleteEvent OPTIONAL)
 {
-#if 0
-    UNIMPLEMENTED;
-    return FALSE;
-#else
-    return NT_SUCCESS(CcRosReleaseFileCache(FileObject));
-#endif
+    NTSTATUS Status;
+
+    Status = CcRosReleaseFileCache(FileObject);
+    if (UninitializeCompleteEvent)
+        KeSetEvent(&UninitializeCompleteEvent->Event, IO_NO_INCREMENT, FALSE);
+    return NT_SUCCESS(Status);
 }
 
 BOOLEAN
 }
 
 BOOLEAN