- Rename made-up Ob functions names to match publicly available NT names, as most of other Ob names do.

svn path=/trunk/; revision=34009
This commit is contained in:
Aleksey Bragin 2008-06-18 12:28:29 +00:00
parent ab2b63b87b
commit f550691222
9 changed files with 67 additions and 67 deletions

View file

@ -66,7 +66,7 @@
// We can call the Ob Inlined API, it's the same thing // We can call the Ob Inlined API, it's the same thing
// //
#define IopAllocateMdlFromLookaside \ #define IopAllocateMdlFromLookaside \
ObpAllocateCapturedAttributes ObpAllocateObjectCreateInfoBuffer
#define IopFreeMdlFromLookaside \ #define IopFreeMdlFromLookaside \
ObpFreeCapturedAttributes ObpFreeCapturedAttributes

View file

@ -562,7 +562,7 @@ ObpCaptureObjectName(
NTSTATUS NTSTATUS
NTAPI NTAPI
ObpCaptureObjectAttributes( ObpCaptureObjectCreateInformation(
IN POBJECT_ATTRIBUTES ObjectAttributes, IN POBJECT_ATTRIBUTES ObjectAttributes,
IN KPROCESSOR_MODE AccessMode, IN KPROCESSOR_MODE AccessMode,
IN BOOLEAN AllocateFromLookaside, IN BOOLEAN AllocateFromLookaside,

View file

@ -79,7 +79,7 @@ ObpReleaseObjectLock(IN POBJECT_HEADER ObjectHeader)
POBJECT_HEADER_NAME_INFO POBJECT_HEADER_NAME_INFO
FORCEINLINE FORCEINLINE
ObpAcquireNameInformation(IN POBJECT_HEADER ObjectHeader) ObpReferenceNameInfo(IN POBJECT_HEADER ObjectHeader)
{ {
POBJECT_HEADER_NAME_INFO ObjectNameInfo; POBJECT_HEADER_NAME_INFO ObjectNameInfo;
ULONG NewValue, References; ULONG NewValue, References;
@ -120,7 +120,7 @@ ObpAcquireNameInformation(IN POBJECT_HEADER ObjectHeader)
VOID VOID
FORCEINLINE FORCEINLINE
ObpReleaseNameInformation(IN POBJECT_HEADER_NAME_INFO HeaderNameInfo) ObpDereferenceNameInfo(IN POBJECT_HEADER_NAME_INFO HeaderNameInfo)
{ {
POBJECT_DIRECTORY Directory; POBJECT_DIRECTORY Directory;
@ -198,7 +198,7 @@ ObpReleaseDirectoryLock(IN POBJECT_DIRECTORY Directory,
VOID VOID
FORCEINLINE FORCEINLINE
ObpInitializeDirectoryLookup(IN POBP_LOOKUP_CONTEXT Context) ObpInitializeLookupContext(IN POBP_LOOKUP_CONTEXT Context)
{ {
/* Initialize a null context */ /* Initialize a null context */
Context->Object = NULL; Context->Object = NULL;
@ -222,7 +222,7 @@ ObpReleaseLookupContextObject(IN POBP_LOOKUP_CONTEXT Context)
HeaderNameInfo = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader); HeaderNameInfo = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader);
/* release the name information */ /* release the name information */
ObpReleaseNameInformation(HeaderNameInfo); ObpDereferenceNameInfo(HeaderNameInfo);
/* Dereference the object */ /* Dereference the object */
ObDereferenceObject(Context->Object); ObDereferenceObject(Context->Object);
@ -232,7 +232,7 @@ ObpReleaseLookupContextObject(IN POBP_LOOKUP_CONTEXT Context)
VOID VOID
FORCEINLINE FORCEINLINE
ObpCleanupDirectoryLookup(IN POBP_LOOKUP_CONTEXT Context) ObpReleaseLookupContext(IN POBP_LOOKUP_CONTEXT Context)
{ {
/* Check if we came back with the directory locked */ /* Check if we came back with the directory locked */
if (Context->DirectoryLocked) if (Context->DirectoryLocked)
@ -273,7 +273,7 @@ ObpLeaveObjectTypeMutex(IN POBJECT_TYPE ObjectType)
VOID VOID
FORCEINLINE FORCEINLINE
ObpReleaseCapturedAttributes(IN POBJECT_CREATE_INFORMATION ObjectCreateInfo) ObpReleaseObjectCreateInformation(IN POBJECT_CREATE_INFORMATION ObjectCreateInfo)
{ {
/* Check if we have a security descriptor */ /* Check if we have a security descriptor */
if (ObjectCreateInfo->SecurityDescriptor) if (ObjectCreateInfo->SecurityDescriptor)
@ -288,7 +288,7 @@ ObpReleaseCapturedAttributes(IN POBJECT_CREATE_INFORMATION ObjectCreateInfo)
PVOID PVOID
FORCEINLINE FORCEINLINE
ObpAllocateCapturedAttributes(IN PP_NPAGED_LOOKASIDE_NUMBER Type) ObpAllocateObjectCreateInfoBuffer(IN PP_NPAGED_LOOKASIDE_NUMBER Type)
{ {
PVOID Buffer; PVOID Buffer;
PNPAGED_LOOKASIDE_LIST List; PNPAGED_LOOKASIDE_LIST List;
@ -369,10 +369,10 @@ ObpFreeCapturedAttributes(IN PVOID Buffer,
VOID VOID
FORCEINLINE FORCEINLINE
ObpFreeAndReleaseCapturedAttributes(IN POBJECT_CREATE_INFORMATION ObjectCreateInfo) ObpFreeObjectCreateInformation(IN POBJECT_CREATE_INFORMATION ObjectCreateInfo)
{ {
/* First release the attributes, then free them from the lookaside list */ /* First release the attributes, then free them from the lookaside list */
ObpReleaseCapturedAttributes(ObjectCreateInfo); ObpReleaseObjectCreateInformation(ObjectCreateInfo);
ObpFreeCapturedAttributes(ObjectCreateInfo, LookasideCreateInfoList); ObpFreeCapturedAttributes(ObjectCreateInfo, LookasideCreateInfoList);
} }

View file

@ -262,7 +262,7 @@ Quickie:
{ {
/* Get the object name information */ /* Get the object name information */
ObjectHeader = OBJECT_TO_OBJECT_HEADER(FoundObject); ObjectHeader = OBJECT_TO_OBJECT_HEADER(FoundObject);
ObpAcquireNameInformation(ObjectHeader); ObpReferenceNameInfo(ObjectHeader);
/* Reference the object being looked up */ /* Reference the object being looked up */
ObReferenceObject(FoundObject); ObReferenceObject(FoundObject);
@ -281,7 +281,7 @@ Quickie:
/* We already did a lookup, so remove this object's query reference */ /* We already did a lookup, so remove this object's query reference */
ObjectHeader = OBJECT_TO_OBJECT_HEADER(Context->Object); ObjectHeader = OBJECT_TO_OBJECT_HEADER(Context->Object);
HeaderNameInfo = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader); HeaderNameInfo = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader);
ObpReleaseNameInformation(HeaderNameInfo); ObpDereferenceNameInfo(HeaderNameInfo);
/* Also dereference the object itself */ /* Also dereference the object itself */
ObDereferenceObject(Context->Object); ObDereferenceObject(Context->Object);
@ -480,7 +480,7 @@ NtQueryDirectoryObject(IN HANDLE DirectoryHandle,
PAGED_CODE(); PAGED_CODE();
/* Initialize lookup */ /* Initialize lookup */
ObpInitializeDirectoryLookup(&LookupContext); ObpInitializeLookupContext(&LookupContext);
/* Check if we need to do any probing */ /* Check if we need to do any probing */
if (PreviousMode != KernelMode) if (PreviousMode != KernelMode)

View file

@ -1467,7 +1467,7 @@ ObpCreateHandle(IN OB_OPEN_REASON OpenReason,
if ((Type) && (ObjectType != Type)) if ((Type) && (ObjectType != Type))
{ {
/* They don't, cleanup */ /* They don't, cleanup */
if (Context) ObpCleanupDirectoryLookup(Context); if (Context) ObpReleaseLookupContext(Context);
return STATUS_OBJECT_TYPE_MISMATCH; return STATUS_OBJECT_TYPE_MISMATCH;
} }
@ -1508,7 +1508,7 @@ ObpCreateHandle(IN OB_OPEN_REASON OpenReason,
* We failed (meaning security failure, according to NT Internals) * We failed (meaning security failure, according to NT Internals)
* detach and return * detach and return
*/ */
if (Context) ObpCleanupDirectoryLookup(Context); if (Context) ObpReleaseLookupContext(Context);
if (AttachedToProcess) KeUnstackDetachProcess(&ApcState); if (AttachedToProcess) KeUnstackDetachProcess(&ApcState);
return Status; return Status;
} }
@ -1545,7 +1545,7 @@ ObpCreateHandle(IN OB_OPEN_REASON OpenReason,
} }
/* Now we can release the object */ /* Now we can release the object */
if (Context) ObpCleanupDirectoryLookup(Context); if (Context) ObpReleaseLookupContext(Context);
/* Save the access mask */ /* Save the access mask */
NewEntry.GrantedAccess = GrantedAccess; NewEntry.GrantedAccess = GrantedAccess;
@ -2417,11 +2417,11 @@ ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes,
if (!TempBuffer) return STATUS_INSUFFICIENT_RESOURCES; if (!TempBuffer) return STATUS_INSUFFICIENT_RESOURCES;
/* Capture all the info */ /* Capture all the info */
Status = ObpCaptureObjectAttributes(ObjectAttributes, Status = ObpCaptureObjectCreateInformation(ObjectAttributes,
AccessMode, AccessMode,
TRUE, TRUE,
&TempBuffer->ObjectCreateInfo, &TempBuffer->ObjectCreateInfo,
&ObjectName); &ObjectName);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* Fail */ /* Fail */
@ -2467,7 +2467,7 @@ ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes,
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* Cleanup after lookup */ /* Cleanup after lookup */
ObpCleanupDirectoryLookup(&TempBuffer->LookupContext); ObpReleaseLookupContext(&TempBuffer->LookupContext);
goto Cleanup; goto Cleanup;
} }
@ -2482,7 +2482,7 @@ ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes,
if (ObjectHeader->ObjectCreateInfo) if (ObjectHeader->ObjectCreateInfo)
{ {
/* Free it */ /* Free it */
ObpFreeAndReleaseCapturedAttributes(ObjectHeader-> ObpFreeObjectCreateInformation(ObjectHeader->
ObjectCreateInfo); ObjectCreateInfo);
ObjectHeader->ObjectCreateInfo = NULL; ObjectHeader->ObjectCreateInfo = NULL;
} }
@ -2501,7 +2501,7 @@ ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes,
Status = STATUS_INVALID_PARAMETER; Status = STATUS_INVALID_PARAMETER;
/* Cleanup after lookup */ /* Cleanup after lookup */
ObpCleanupDirectoryLookup(&TempBuffer->LookupContext); ObpReleaseLookupContext(&TempBuffer->LookupContext);
/* Dereference the object */ /* Dereference the object */
ObDereferenceObject(Object); ObDereferenceObject(Object);
@ -2531,7 +2531,7 @@ Cleanup:
Quickie: Quickie:
/* Release the object attributes and temporary buffer */ /* Release the object attributes and temporary buffer */
ObpReleaseCapturedAttributes(&TempBuffer->ObjectCreateInfo); ObpReleaseObjectCreateInformation(&TempBuffer->ObjectCreateInfo);
if (ObjectName.Buffer) ObpFreeObjectNameBuffer(&ObjectName); if (ObjectName.Buffer) ObpFreeObjectNameBuffer(&ObjectName);
ExFreePool(TempBuffer); ExFreePool(TempBuffer);
@ -2813,7 +2813,7 @@ ObInsertObject(IN PVOID Object,
/* Get the create and name info, as well as the object type */ /* Get the create and name info, as well as the object type */
ObjectCreateInfo = ObjectHeader->ObjectCreateInfo; ObjectCreateInfo = ObjectHeader->ObjectCreateInfo;
ObjectNameInfo = ObpAcquireNameInformation(ObjectHeader); ObjectNameInfo = ObpReferenceNameInfo(ObjectHeader);
ObjectType = ObjectHeader->Type; ObjectType = ObjectHeader->Type;
ObjectName = NULL; ObjectName = NULL;
@ -2849,10 +2849,10 @@ ObInsertObject(IN PVOID Object,
Handle); Handle);
/* Free the create information */ /* Free the create information */
ObpFreeAndReleaseCapturedAttributes(ObjectCreateInfo); ObpFreeObjectCreateInformation(ObjectCreateInfo);
/* Release the object name information */ /* Release the object name information */
ObpReleaseNameInformation(ObjectNameInfo); ObpDereferenceNameInfo(ObjectNameInfo);
/* Remove the extra keep-alive reference */ /* Remove the extra keep-alive reference */
ObDereferenceObject(Object); ObDereferenceObject(Object);
@ -2878,7 +2878,7 @@ ObInsertObject(IN PVOID Object,
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* Fail */ /* Fail */
ObpReleaseNameInformation(ObjectNameInfo); ObpDereferenceNameInfo(ObjectNameInfo);
ObDereferenceObject(Object); ObDereferenceObject(Object);
return Status; return Status;
} }
@ -2892,13 +2892,13 @@ ObInsertObject(IN PVOID Object,
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* Fail */ /* Fail */
ObpReleaseNameInformation(ObjectNameInfo); ObpDereferenceNameInfo(ObjectNameInfo);
ObDereferenceObject(Object); ObDereferenceObject(Object);
return Status; return Status;
} }
/* Setup a lookup context */ /* Setup a lookup context */
ObpInitializeDirectoryLookup(&Context); ObpInitializeLookupContext(&Context);
InsertObject = Object; InsertObject = Object;
OpenReason = ObCreateHandle; OpenReason = ObCreateHandle;
@ -2959,10 +2959,10 @@ ObInsertObject(IN PVOID Object,
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* Cleanup after lookup */ /* Cleanup after lookup */
ObpCleanupDirectoryLookup(&Context); ObpReleaseLookupContext(&Context);
/* Remove query reference that we added */ /* Remove query reference that we added */
ObpReleaseNameInformation(ObjectNameInfo); ObpDereferenceNameInfo(ObjectNameInfo);
/* Dereference the object and delete the access state */ /* Dereference the object and delete the access state */
ObDereferenceObject(Object); ObDereferenceObject(Object);
@ -3038,10 +3038,10 @@ ObInsertObject(IN PVOID Object,
} }
/* Cleanup the lookup */ /* Cleanup the lookup */
ObpCleanupDirectoryLookup(&Context); ObpReleaseLookupContext(&Context);
/* Remove query reference that we added */ /* Remove query reference that we added */
ObpReleaseNameInformation(ObjectNameInfo); ObpDereferenceNameInfo(ObjectNameInfo);
/* Dereference the object and delete the access state */ /* Dereference the object and delete the access state */
ObDereferenceObject(Object); ObDereferenceObject(Object);
@ -3086,7 +3086,7 @@ ObInsertObject(IN PVOID Object,
} }
/* Remove a query reference */ /* Remove a query reference */
ObpReleaseNameInformation(ObjectNameInfo); ObpDereferenceNameInfo(ObjectNameInfo);
/* Remove the extra keep-alive reference */ /* Remove the extra keep-alive reference */
ObDereferenceObject(Object); ObDereferenceObject(Object);
@ -3109,7 +3109,7 @@ ObInsertObject(IN PVOID Object,
} }
/* We can delete the Create Info now */ /* We can delete the Create Info now */
ObpFreeAndReleaseCapturedAttributes(ObjectCreateInfo); ObpFreeObjectCreateInformation(ObjectCreateInfo);
/* Check if we created our own access state and delete it if so */ /* Check if we created our own access state and delete it if so */
if (AccessState == &LocalAccessState) SeDeleteAccessState(AccessState); if (AccessState == &LocalAccessState) SeDeleteAccessState(AccessState);

View file

@ -298,7 +298,7 @@ ObPostPhase0:
if (!NT_SUCCESS(Status)) return FALSE; if (!NT_SUCCESS(Status)) return FALSE;
/* Initialize lookup context */ /* Initialize lookup context */
ObpInitializeDirectoryLookup(&Context); ObpInitializeLookupContext(&Context);
/* Lock it */ /* Lock it */
ObpAcquireDirectoryLockExclusive(ObpTypeDirectoryObject, &Context); ObpAcquireDirectoryLockExclusive(ObpTypeDirectoryObject, &Context);
@ -339,7 +339,7 @@ ObPostPhase0:
} }
/* Cleanup after lookup */ /* Cleanup after lookup */
ObpCleanupDirectoryLookup(&Context); ObpReleaseLookupContext(&Context);
/* Initialize DOS Devices Directory and related Symbolic Links */ /* Initialize DOS Devices Directory and related Symbolic Links */
Status = ObpCreateDosDevicesDirectory(); Status = ObpCreateDosDevicesDirectory();

View file

@ -80,7 +80,7 @@ ObpDeallocateObject(IN PVOID Object)
if (Header->ObjectCreateInfo) if (Header->ObjectCreateInfo)
{ {
/* Free it */ /* Free it */
ObpFreeAndReleaseCapturedAttributes(Header->ObjectCreateInfo); ObpFreeObjectCreateInformation(Header->ObjectCreateInfo);
Header->ObjectCreateInfo = NULL; Header->ObjectCreateInfo = NULL;
} }
} }
@ -311,7 +311,7 @@ ObpAllocateObjectNameBuffer(IN ULONG Length,
{ {
/* Allocate from the lookaside */ /* Allocate from the lookaside */
//MaximumLength = 248; <= hack, we should actually set this...! //MaximumLength = 248; <= hack, we should actually set this...!
Buffer = ObpAllocateCapturedAttributes(LookasideNameBufferList); Buffer = ObpAllocateObjectCreateInfoBuffer(LookasideNameBufferList);
} }
/* Setup the string */ /* Setup the string */
@ -418,7 +418,7 @@ ObpCaptureObjectName(IN OUT PUNICODE_STRING CapturedName,
NTSTATUS NTSTATUS
NTAPI NTAPI
ObpCaptureObjectAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes, ObpCaptureObjectCreateInformation(IN POBJECT_ATTRIBUTES ObjectAttributes,
IN KPROCESSOR_MODE AccessMode, IN KPROCESSOR_MODE AccessMode,
IN BOOLEAN AllocateFromLookaside, IN BOOLEAN AllocateFromLookaside,
IN POBJECT_CREATE_INFORMATION ObjectCreateInfo, IN POBJECT_CREATE_INFORMATION ObjectCreateInfo,
@ -541,7 +541,7 @@ ObpCaptureObjectAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes,
} }
/* Cleanup if we failed */ /* Cleanup if we failed */
if (!NT_SUCCESS(Status)) ObpReleaseCapturedAttributes(ObjectCreateInfo); if (!NT_SUCCESS(Status)) ObpFreeObjectCreateInformation(ObjectCreateInfo);
/* Return status to caller */ /* Return status to caller */
return Status; return Status;
@ -916,15 +916,15 @@ ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL,
POBJECT_HEADER Header; POBJECT_HEADER Header;
/* Allocate a capture buffer */ /* Allocate a capture buffer */
ObjectCreateInfo = ObpAllocateCapturedAttributes(LookasideCreateInfoList); ObjectCreateInfo = ObpAllocateObjectCreateInfoBuffer(LookasideCreateInfoList);
if (!ObjectCreateInfo) return STATUS_INSUFFICIENT_RESOURCES; if (!ObjectCreateInfo) return STATUS_INSUFFICIENT_RESOURCES;
/* Capture all the info */ /* Capture all the info */
Status = ObpCaptureObjectAttributes(ObjectAttributes, Status = ObpCaptureObjectCreateInformation(ObjectAttributes,
ProbeMode, ProbeMode,
FALSE, FALSE,
ObjectCreateInfo, ObjectCreateInfo,
&ObjectName); &ObjectName);
if (NT_SUCCESS(Status)) if (NT_SUCCESS(Status))
{ {
/* Validate attributes */ /* Validate attributes */
@ -984,7 +984,7 @@ ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL,
} }
/* Release the Capture Info, we don't need it */ /* Release the Capture Info, we don't need it */
ObpReleaseCapturedAttributes(ObjectCreateInfo); ObpFreeObjectCreateInformation(ObjectCreateInfo);
if (ObjectName.Buffer) ObpFreeObjectNameBuffer(&ObjectName); if (ObjectName.Buffer) ObpFreeObjectNameBuffer(&ObjectName);
} }
@ -1038,7 +1038,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
} }
/* Setup a lookup context */ /* Setup a lookup context */
ObpInitializeDirectoryLookup(&Context); ObpInitializeLookupContext(&Context);
/* Check if we've already created the directory of types */ /* Check if we've already created the directory of types */
if (ObpTypeDirectoryObject) if (ObpTypeDirectoryObject)
@ -1054,7 +1054,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
&Context)) &Context))
{ {
/* We have already created it, so fail */ /* We have already created it, so fail */
ObpCleanupDirectoryLookup(&Context); ObpReleaseLookupContext(&Context);
return STATUS_OBJECT_NAME_COLLISION; return STATUS_OBJECT_NAME_COLLISION;
} }
} }
@ -1066,7 +1066,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
if (!ObjectName.Buffer) if (!ObjectName.Buffer)
{ {
/* Out of memory, fail */ /* Out of memory, fail */
ObpCleanupDirectoryLookup(&Context); ObpReleaseLookupContext(&Context);
return STATUS_INSUFFICIENT_RESOURCES; return STATUS_INSUFFICIENT_RESOURCES;
} }
@ -1084,7 +1084,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* Free the name and fail */ /* Free the name and fail */
ObpCleanupDirectoryLookup(&Context); ObpReleaseLookupContext(&Context);
ExFreePool(ObjectName.Buffer); ExFreePool(ObjectName.Buffer);
return Status; return Status;
} }
@ -1224,7 +1224,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
} }
/* Cleanup the lookup context */ /* Cleanup the lookup context */
ObpCleanupDirectoryLookup(&Context); ObpReleaseLookupContext(&Context);
/* Return the object type and success */ /* Return the object type and success */
*ObjectType = LocalObjectType; *ObjectType = LocalObjectType;
@ -1232,7 +1232,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
} }
/* If we got here, then we failed */ /* If we got here, then we failed */
ObpCleanupDirectoryLookup(&Context); ObpReleaseLookupContext(&Context);
return STATUS_INSUFFICIENT_RESOURCES; return STATUS_INSUFFICIENT_RESOURCES;
} }

View file

@ -179,7 +179,7 @@ ObpDeleteNameCheck(IN PVOID Object)
/* Get object structures */ /* Get object structures */
ObjectHeader = OBJECT_TO_OBJECT_HEADER(Object); ObjectHeader = OBJECT_TO_OBJECT_HEADER(Object);
ObjectNameInfo = ObpAcquireNameInformation(ObjectHeader); ObjectNameInfo = ObpReferenceNameInfo(ObjectHeader);
ObjectType = ObjectHeader->Type; ObjectType = ObjectHeader->Type;
/* /*
@ -193,7 +193,7 @@ ObpDeleteNameCheck(IN PVOID Object)
!(ObjectHeader->Flags & OB_FLAG_PERMANENT)) !(ObjectHeader->Flags & OB_FLAG_PERMANENT))
{ {
/* Setup a lookup context */ /* Setup a lookup context */
ObpInitializeDirectoryLookup(&Context); ObpInitializeLookupContext(&Context);
/* Lock the directory */ /* Lock the directory */
ObpAcquireDirectoryLockExclusive(ObjectNameInfo->Directory, &Context); ObpAcquireDirectoryLockExclusive(ObjectNameInfo->Directory, &Context);
@ -242,16 +242,16 @@ ObpDeleteNameCheck(IN PVOID Object)
} }
/* Cleanup after lookup */ /* Cleanup after lookup */
ObpCleanupDirectoryLookup(&Context); ObpReleaseLookupContext(&Context);
/* Remove another query reference since we added one on top */ /* Remove another query reference since we added one on top */
ObpReleaseNameInformation(ObjectNameInfo); ObpDereferenceNameInfo(ObjectNameInfo);
/* Check if we were inserted in a directory */ /* Check if we were inserted in a directory */
if (Directory) if (Directory)
{ {
/* We were, so first remove the extra reference we had added */ /* We were, so first remove the extra reference we had added */
ObpReleaseNameInformation(ObjectNameInfo); ObpDereferenceNameInfo(ObjectNameInfo);
/* Now dereference the object as well */ /* Now dereference the object as well */
ObDereferenceObject(Object); ObDereferenceObject(Object);
@ -260,7 +260,7 @@ ObpDeleteNameCheck(IN PVOID Object)
else else
{ {
/* Remove the reference we added */ /* Remove the reference we added */
ObpReleaseNameInformation(ObjectNameInfo); ObpDereferenceNameInfo(ObjectNameInfo);
} }
} }
@ -300,7 +300,7 @@ ObpLookupObjectName(IN HANDLE RootHandle OPTIONAL,
InsertObject); InsertObject);
/* Initialize starting state */ /* Initialize starting state */
ObpInitializeDirectoryLookup(LookupContext); ObpInitializeLookupContext(LookupContext);
*FoundObject = NULL; *FoundObject = NULL;
Status = STATUS_SUCCESS; Status = STATUS_SUCCESS;
Object = NULL; Object = NULL;
@ -755,7 +755,7 @@ ReparseObject:
InterlockedExchangeAdd(&ObjectHeader->PointerCount, 1); InterlockedExchangeAdd(&ObjectHeader->PointerCount, 1);
/* Cleanup from the first lookup */ /* Cleanup from the first lookup */
ObpCleanupDirectoryLookup(LookupContext); ObpReleaseLookupContext(LookupContext);
/* Check if we have a referenced directory */ /* Check if we have a referenced directory */
if (ReferencedDirectory) if (ReferencedDirectory)
@ -931,7 +931,7 @@ ReparseObject:
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* Cleanup after lookup */ /* Cleanup after lookup */
ObpCleanupDirectoryLookup(LookupContext); ObpReleaseLookupContext(LookupContext);
} }
/* Check if we have a device map and dereference it if so */ /* Check if we have a device map and dereference it if so */

View file

@ -429,7 +429,7 @@ ObReferenceObjectByName(IN PUNICODE_STRING ObjectPath,
&Object); &Object);
/* Cleanup after lookup */ /* Cleanup after lookup */
ObpCleanupDirectoryLookup(&Context); ObpReleaseLookupContext(&Context);
/* Check if the lookup succeeded */ /* Check if the lookup succeeded */
if (NT_SUCCESS(Status)) if (NT_SUCCESS(Status))