From 13b2222c28f3cf2024b0fe5b14b6ef1640ce3dca Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Tue, 26 Jul 2005 21:33:38 +0000 Subject: [PATCH] reverted last change svn path=/trunk/; revision=16761 --- reactos/ntoskrnl/ex/handle.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/reactos/ntoskrnl/ex/handle.c b/reactos/ntoskrnl/ex/handle.c index bfe55ee5264..03221bd0358 100644 --- a/reactos/ntoskrnl/ex/handle.c +++ b/reactos/ntoskrnl/ex/handle.c @@ -910,16 +910,14 @@ ExMapHandleToPointer(IN PHANDLE_TABLE HandleTable, ASSERT(HandleTable); - ExAcquireHandleTableLockShared(HandleTable); HandleTableEntry = ExpLookupHandleTableEntry(HandleTable, Handle); if (HandleTableEntry != NULL && ExLockHandleTableEntry(HandleTable, HandleTableEntry)) { DPRINT("ExMapHandleToPointer HT:0x%p Entry:0x%p locked\n", HandleTable, HandleTableEntry); - ExReleaseHandleTableLock(HandleTable); return HandleTableEntry; } - ExReleaseHandleTableLock(HandleTable); + return NULL; } @@ -938,14 +936,12 @@ ExChangeHandle(IN PHANDLE_TABLE HandleTable, ASSERT(ChangeHandleCallback); KeEnterCriticalRegion(); - ExAcquireHandleTableLockShared(HandleTable); HandleTableEntry = ExpLookupHandleTableEntry(HandleTable, Handle); if(HandleTableEntry != NULL && ExLockHandleTableEntry(HandleTable, HandleTableEntry)) { - ExReleaseHandleTableLock(HandleTable); Ret = ChangeHandleCallback(HandleTable, HandleTableEntry, NULL); @@ -953,10 +949,7 @@ ExChangeHandle(IN PHANDLE_TABLE HandleTable, ExUnlockHandleTableEntry(HandleTable, HandleTableEntry); } - else - { - ExReleaseHandleTableLock(HandleTable); - } + KeLeaveCriticalRegion(); return Ret;