[NTOS] Configuration Manager fixes.
[reactos.git] / ntoskrnl / config / ntapi.c
index 5be3a27..f3137ce 100644 (file)
@@ -1302,7 +1302,8 @@ NtInitializeRegistry(IN USHORT Flag)
     PAGED_CODE();
 
     /* Always do this as kernel mode */
-    if (KeGetPreviousMode() == UserMode) return ZwInitializeRegistry(Flag);
+    if (KeGetPreviousMode() == UserMode)
+        return ZwInitializeRegistry(Flag);
 
     /* Enough of the system has booted by now */
     Ki386PerfEnd();
@@ -1344,8 +1345,8 @@ NtInitializeRegistry(IN USHORT Flag)
     if (!CmFirstTime) return STATUS_ACCESS_DENIED;
     CmFirstTime = FALSE;
 
-    /* Acquire registry lock */
-    //CmpLockRegistryExclusive();
+    /* Lock the registry exclusively */
+    CmpLockRegistryExclusive();
 
     /* Initialize the hives and lazy flusher */
     CmpCmdInit(SetupBoot);
@@ -1354,7 +1355,7 @@ NtInitializeRegistry(IN USHORT Flag)
     CmpSetVersionData();
 
     /* Release the registry lock */
-    //CmpUnlockRegistry();
+    CmpUnlockRegistry();
     return STATUS_SUCCESS;
 }