* Sync up to trunk head (r60691).
[reactos.git] / ntoskrnl / ob / obsdcach.c
index 8e51d96..7573ba6 100644 (file)
@@ -57,6 +57,7 @@ ObpSdReleaseLockShared(IN POB_SD_CACHE_LIST CacheEntry)
 
 NTSTATUS
 NTAPI
+INIT_FUNCTION
 ObpInitSdCache(VOID)
 {
     ULONG i;
@@ -66,7 +67,7 @@ ObpInitSdCache(VOID)
     {
         /* Initialize the lock and the list */
         InitializeListHead(&ObsSecurityDescriptorCache[i].Head);
-        ExInitializePushLock((PULONG_PTR)&ObsSecurityDescriptorCache[i].PushLock);
+        ExInitializePushLock(&ObsSecurityDescriptorCache[i].PushLock);
     }
 
     /* Return success */
@@ -131,7 +132,7 @@ ObpCreateCacheEntry(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
     
     /* Calculate the memory we'll need to allocate and allocate it */
     CacheSize = Length + (sizeof(SECURITY_DESCRIPTOR_HEADER) - sizeof(QUAD));
-    SdHeader = ExAllocatePoolWithTag(PagedPool, CacheSize, 'cSbO');
+    SdHeader = ExAllocatePoolWithTag(PagedPool, CacheSize, TAG_OB_SD_CACHE);
     if (!SdHeader) return NULL;
     
     /* Setup the header */
@@ -418,7 +419,7 @@ ObLogSecurityDescriptor(IN PSECURITY_DESCRIPTOR InputSecurityDescriptor,
         {
             /* Increment its reference count */
             InterlockedExchangeAdd((PLONG)&SdHeader->RefCount, RefBias);
-                                              
+            
             /* Release the lock */
             ObpSdReleaseLockShared(CacheEntry);
             
@@ -426,7 +427,7 @@ ObLogSecurityDescriptor(IN PSECURITY_DESCRIPTOR InputSecurityDescriptor,
             *OutputSecurityDescriptor = &SdHeader->SecurityDescriptor;
             
             /* Free anything that we may have had to create */
-            if (NewHeader) ExFreePool(NewHeader);
+            if (NewHeader) ExFreePoolWithTag(NewHeader, TAG_OB_SD_CACHE);
             return STATUS_SUCCESS;
         }