Author: rmessiant
Date: Sat May 28 17:56:07 2011
New Revision: 51981
URL: http://svn.reactos.org/svn/reactos?rev=51981&view=rev
Log:
[NTOSKRNL]
- Don't treat the head of the tracking block list as a list entry.
Modified:
trunk/reactos/ntoskrnl/io/iomgr/remlock.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/remlock.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/remlock.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/remlock.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/remlock.c [iso-8859-1] Sat May 28 17:56:07 2011
@@ -164,7 +164,7 @@
/* 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 @@
{
/* 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));