- Add a comment describing behavior in case of HvSyncHive failure.

svn path=/trunk/; revision=33574
This commit is contained in:
Aleksey Bragin 2008-05-18 11:26:36 +00:00
parent 5508c5cbb2
commit b97e40c655

View file

@ -18,18 +18,18 @@ BOOLEAN
NTAPI NTAPI
CmpDoFlushAll(IN BOOLEAN ForceFlush) CmpDoFlushAll(IN BOOLEAN ForceFlush)
{ {
NTSTATUS Status;
PLIST_ENTRY NextEntry; PLIST_ENTRY NextEntry;
PCMHIVE Hive; PCMHIVE Hive;
BOOLEAN Result = TRUE; NTSTATUS Status;
BOOLEAN Result = TRUE;
/* Make sure that the registry isn't read-only now */ /* Make sure that the registry isn't read-only now */
if (CmpNoWrite) return TRUE; if (CmpNoWrite) return TRUE;
/* Otherwise, acquire the hive list lock and disable force flush */ /* Otherwise, acquire the hive list lock and disable force flush */
CmpForceForceFlush = FALSE; CmpForceForceFlush = FALSE;
ExAcquirePushLockShared(&CmpHiveListHeadLock); ExAcquirePushLockShared(&CmpHiveListHeadLock);
/* Loop the hive list */ /* Loop the hive list */
NextEntry = CmpHiveListHead.Flink; NextEntry = CmpHiveListHead.Flink;
while (NextEntry != &CmpHiveListHead) while (NextEntry != &CmpHiveListHead)
@ -43,6 +43,8 @@ CmpDoFlushAll(IN BOOLEAN ForceFlush)
/* Do the sync */ /* Do the sync */
Status = HvSyncHive(&Hive->Hive); Status = HvSyncHive(&Hive->Hive);
/* If something failed - set the flag and continue looping*/
if (!NT_SUCCESS(Status)) Result = FALSE; if (!NT_SUCCESS(Status)) Result = FALSE;
/* Release the flusher lock */ /* Release the flusher lock */
@ -52,7 +54,7 @@ CmpDoFlushAll(IN BOOLEAN ForceFlush)
/* Try the next entry */ /* Try the next entry */
NextEntry = NextEntry->Flink; NextEntry = NextEntry->Flink;
} }
/* Release lock and return */ /* Release lock and return */
ExReleasePushLock(&CmpHiveListHeadLock); ExReleasePushLock(&CmpHiveListHeadLock);
return Result; return Result;