]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Make sure registry updates and deletes are flushed 8.1.0-rc4
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 26 Nov 2015 16:17:14 +0000 (16:17 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Thu, 26 Nov 2015 17:28:15 +0000 (17:28 +0000)
In most cases it is desirable to makre sure any updates are committed to
the registry hive on storage before any further operations are performed.
This patch adds ZwFlushKey() calls to ensure that is the case.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/common/registry.c

index b75f16b71363df6268cd6364e42652485fe5b675..9e9f79a81d338c580bcea3e4dfbaa5d8a05a2caf 100644 (file)
@@ -372,6 +372,8 @@ RegistryDeleteSubKey(
 
     ZwClose(SubKey);
 
+    (VOID) ZwFlushKey(Key);
+
     RtlFreeUnicodeString(&Unicode);
 
     return STATUS_SUCCESS;
@@ -610,6 +612,8 @@ RegistryDeleteValue(
 
     RtlFreeUnicodeString(&Unicode);
 
+    (VOID) ZwFlushKey(Key);
+
     return STATUS_SUCCESS;
 
 fail2:
@@ -730,6 +734,8 @@ RegistryUpdateDwordValue(
 
     __RegistryFree(Partial);
 
+    (VOID) ZwFlushKey(Key);
+
     RtlFreeUnicodeString(&Unicode);
 
     return STATUS_SUCCESS;
@@ -1060,6 +1066,8 @@ RegistryUpdateBinaryValue(
 
     __RegistryFree(Partial);
 
+    (VOID) ZwFlushKey(Key);
+
     RtlFreeUnicodeString(&Unicode);
 
     return STATUS_SUCCESS;
@@ -1350,6 +1358,8 @@ RegistryUpdateSzValue(
 
     __RegistryFree(Partial);
 
+    (VOID) ZwFlushKey(Key);
+
     RtlFreeUnicodeString(&Unicode);
 
     return STATUS_SUCCESS;