Author: fireball Date: Sun May 18 06:26:36 2008 New Revision: 33574
URL: http://svn.reactos.org/svn/reactos?rev=33574&view=rev Log: - Add a comment describing behavior in case of HvSyncHive failure.
Modified: trunk/reactos/ntoskrnl/config/cmapi.c
Modified: trunk/reactos/ntoskrnl/config/cmapi.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmapi.c?rev... ============================================================================== --- trunk/reactos/ntoskrnl/config/cmapi.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmapi.c [iso-8859-1] Sun May 18 06:26:36 2008 @@ -18,18 +18,18 @@ NTAPI CmpDoFlushAll(IN BOOLEAN ForceFlush) { - NTSTATUS Status; PLIST_ENTRY NextEntry; PCMHIVE Hive; - BOOLEAN Result = TRUE; + NTSTATUS Status; + BOOLEAN Result = TRUE;
/* Make sure that the registry isn't read-only now */ if (CmpNoWrite) return TRUE; - + /* Otherwise, acquire the hive list lock and disable force flush */ CmpForceForceFlush = FALSE; ExAcquirePushLockShared(&CmpHiveListHeadLock); - + /* Loop the hive list */ NextEntry = CmpHiveListHead.Flink; while (NextEntry != &CmpHiveListHead) @@ -43,6 +43,8 @@
/* Do the sync */ Status = HvSyncHive(&Hive->Hive); + + /* If something failed - set the flag and continue looping*/ if (!NT_SUCCESS(Status)) Result = FALSE;
/* Release the flusher lock */ @@ -52,7 +54,7 @@ /* Try the next entry */ NextEntry = NextEntry->Flink; } - + /* Release lock and return */ ExReleasePushLock(&CmpHiveListHeadLock); return Result;