From 91ed75b1f7f259c691487117eb498e4f9bd2e94d Mon Sep 17 00:00:00 2001 From: Roel Messiant Date: Sat, 28 May 2011 17:56:07 +0000 Subject: [PATCH] [NTOSKRNL] - Don't treat the head of the tracking block list as a list entry. svn path=/trunk/; revision=51981 --- reactos/ntoskrnl/io/iomgr/remlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/iomgr/remlock.c b/reactos/ntoskrnl/io/iomgr/remlock.c index 8dd64a09434..5a97a0cb985 100644 --- a/reactos/ntoskrnl/io/iomgr/remlock.c +++ b/reactos/ntoskrnl/io/iomgr/remlock.c @@ -164,7 +164,7 @@ IoReleaseRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, /* Start browsing tracking blocks to find a block that would match given tag */ TagFound = FALSE; - for (ListEntry = (PSINGLE_LIST_ENTRY)&Lock->Dbg.Blocks; ListEntry; ListEntry = ListEntry->Next) + for (ListEntry = ((PSINGLE_LIST_ENTRY)&Lock->Dbg.Blocks)->Next; ListEntry; ListEntry = ListEntry->Next) { TrackingBlock = CONTAINING_RECORD(ListEntry, IO_REMOVE_LOCK_TRACKING_BLOCK, BlockEntry); @@ -186,7 +186,7 @@ IoReleaseRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, { /* Yes, then remove it from the queue and free it */ TagFound = TRUE; - if (ListEntry == (PSINGLE_LIST_ENTRY)&Lock->Dbg.Blocks) + if (ListEntry == ((PSINGLE_LIST_ENTRY)&Lock->Dbg.Blocks)->Next) { /* Here it is head, remove it using macro */ PopEntryList((PSINGLE_LIST_ENTRY)&(Lock->Dbg.Blocks));