Author: tfaber
Date: Sun Jun 21 09:20:01 2015
New Revision: 68227
URL:
http://svn.reactos.org/svn/reactos?rev=68227&view=rev
Log:
[NTOS:CC]
- Raise an exception in case of failure in CcInitializeCacheMap
CORE-9848
Modified:
trunk/reactos/ntoskrnl/cc/fs.c
trunk/reactos/ntoskrnl/cc/view.c
Modified: trunk/reactos/ntoskrnl/cc/fs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/fs.c?rev=68227…
==============================================================================
--- trunk/reactos/ntoskrnl/cc/fs.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cc/fs.c [iso-8859-1] Sun Jun 21 09:20:01 2015
@@ -92,6 +92,8 @@
IN PCACHE_MANAGER_CALLBACKS CallBacks,
IN PVOID LazyWriterContext)
{
+ NTSTATUS Status;
+
ASSERT(FileObject);
ASSERT(FileSizes);
@@ -99,10 +101,12 @@
FileObject, FileSizes, PinAccess, CallBacks, LazyWriterContext);
/* Call old ROS cache init function */
- CcRosInitializeFileCache(FileObject,
- FileSizes,
- CallBacks,
- LazyWriterContext);
+ Status = CcRosInitializeFileCache(FileObject,
+ FileSizes,
+ CallBacks,
+ LazyWriterContext);
+ if (!NT_SUCCESS(Status))
+ ExRaiseStatus(Status);
}
/*
Modified: trunk/reactos/ntoskrnl/cc/view.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/view.c?rev=682…
==============================================================================
--- trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] Sun Jun 21 09:20:01 2015
@@ -1176,7 +1176,7 @@
if (SharedCacheMap == NULL)
{
KeReleaseGuardedMutex(&ViewLock);
- return STATUS_UNSUCCESSFUL;
+ return STATUS_INSUFFICIENT_RESOURCES;
}
RtlZeroMemory(SharedCacheMap, sizeof(*SharedCacheMap));
ObReferenceObjectByPointer(FileObject,