Author: ion
Date: Mon Jan 8 10:54:57 2007
New Revision: 25371
URL:
http://svn.reactos.org/svn/reactos?rev=25371&view=rev
Log:
- Changes to lookup context set-up as place-holder and compatibility for future patch.
Only configure the lookup context once, outside the initial loop, instead of configuring
it with the same settings at each iteration.
Modified:
trunk/reactos/ntoskrnl/ob/obinit.c
Modified: trunk/reactos/ntoskrnl/ob/obinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obinit.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obinit.c (original)
+++ trunk/reactos/ntoskrnl/ob/obinit.c Mon Jan 8 10:54:57 2007
@@ -12,11 +12,9 @@
#include <ntoskrnl.h>
#define NDEBUG
-#include <internal/debug.h>
-
-#if defined (ALLOC_PRAGMA)
-#pragma alloc_text(INIT, ObInit)
-#endif
+#include <debug.h>
+
+/* GLOBALS *******************************************************************/
GENERIC_MAPPING ObpTypeMapping =
{
@@ -280,6 +278,10 @@
Status = NtClose(Handle);
if (!NT_SUCCESS(Status)) return FALSE;
+ Context.Object = NULL;
+ Context.Directory = ObpTypeDirectoryObject;
+ Context.DirectoryLocked = TRUE;
+
/* Loop the object types */
ListHead = &ObTypeObjectType->TypeList;
NextEntry = ListHead->Flink;
@@ -297,10 +299,6 @@
/* Make sure we have a name, and aren't inserted yet */
if ((NameInfo) && !(NameInfo->Directory))
{
- /* Set up the context for the insert */
- Context.Directory = ObpTypeDirectoryObject;
- Context.DirectoryLocked = TRUE;
-
/* Do the initial lookup to setup the context */
if (!ObpLookupEntryDirectory(ObpTypeDirectoryObject,
&NameInfo->Name,
@@ -319,6 +317,8 @@
NextEntry = NextEntry->Flink;
}
+ Context.Object = NULL;
+
/* Initialize DOS Devices Directory and related Symbolic Links */
Status = ObpCreateDosDevicesDirectory();
if (!NT_SUCCESS(Status)) return FALSE;