[NTOS:CM] Simplify CmpDelayAllocBucketLock code a bit (#5729)

- Remove duplicate CmpDelayAllocBucketLock definition.
- Remove an else.
This commit is contained in:
Serge Gautherie 2023-09-28 11:39:13 +02:00 committed by GitHub
parent f2a012240f
commit c84b5007d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,9 +15,9 @@
/* GLOBALS *******************************************************************/ /* GLOBALS *******************************************************************/
BOOLEAN CmpAllocInited; BOOLEAN CmpAllocInited;
KGUARDED_MUTEX CmpAllocBucketLock, CmpDelayAllocBucketLock; KGUARDED_MUTEX CmpAllocBucketLock;
LIST_ENTRY CmpFreeKCBListHead; LIST_ENTRY CmpFreeKCBListHead;
KGUARDED_MUTEX CmpDelayAllocBucketLock; KGUARDED_MUTEX CmpDelayAllocBucketLock;
LIST_ENTRY CmpFreeDelayItemsListHead; LIST_ENTRY CmpFreeDelayItemsListHead;
@ -252,16 +252,14 @@ SearchList:
/* Clear the KCB pointer */ /* Clear the KCB pointer */
Entry->Kcb = NULL; Entry->Kcb = NULL;
} }
}
else /* Do the search again */
{ goto SearchList;
/* Release the lock */
KeReleaseGuardedMutex(&CmpDelayAllocBucketLock);
return NULL;
} }
/* Do the search again */ /* Release the lock */
goto SearchList; KeReleaseGuardedMutex(&CmpDelayAllocBucketLock);
return NULL;
} }
VOID VOID