mirror of
https://github.com/reactos/reactos.git
synced 2025-06-15 00:10:01 +00:00
[NTOSKRNL]
Fix CmpDestroyHiveViewList adding checks for empty lists. Thank you very much Thomas! svn path=/trunk/; revision=68315
This commit is contained in:
parent
9826966d55
commit
d25d5b8cec
1 changed files with 6 additions and 10 deletions
|
@ -34,7 +34,6 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
CmpDestroyHiveViewList(IN PCMHIVE Hive)
|
CmpDestroyHiveViewList(IN PCMHIVE Hive)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
PCM_VIEW_OF_FILE CmView;
|
PCM_VIEW_OF_FILE CmView;
|
||||||
PLIST_ENTRY EntryList;
|
PLIST_ENTRY EntryList;
|
||||||
|
|
||||||
|
@ -42,9 +41,10 @@ CmpDestroyHiveViewList(IN PCMHIVE Hive)
|
||||||
ASSERT(Hive->Hive.ReadOnly == FALSE);
|
ASSERT(Hive->Hive.ReadOnly == FALSE);
|
||||||
|
|
||||||
/* Free all the views inside the Pinned View List */
|
/* Free all the views inside the Pinned View List */
|
||||||
EntryList = RemoveHeadList(&Hive->PinViewListHead);
|
while (!IsListEmpty(&Hive->PinViewListHead))
|
||||||
while (EntryList != &Hive->PinViewListHead)
|
|
||||||
{
|
{
|
||||||
|
EntryList = RemoveHeadList(&Hive->PinViewListHead);
|
||||||
|
|
||||||
CmView = CONTAINING_RECORD(EntryList, CM_VIEW_OF_FILE, PinViewList);
|
CmView = CONTAINING_RECORD(EntryList, CM_VIEW_OF_FILE, PinViewList);
|
||||||
|
|
||||||
/* FIXME: Unmap the view if it is mapped */
|
/* FIXME: Unmap the view if it is mapped */
|
||||||
|
@ -52,8 +52,6 @@ CmpDestroyHiveViewList(IN PCMHIVE Hive)
|
||||||
ExFreePool(CmView);
|
ExFreePool(CmView);
|
||||||
|
|
||||||
Hive->PinnedViews--;
|
Hive->PinnedViews--;
|
||||||
|
|
||||||
EntryList = RemoveHeadList(&Hive->PinViewListHead);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The Pinned View List should be empty */
|
/* The Pinned View List should be empty */
|
||||||
|
@ -61,9 +59,10 @@ CmpDestroyHiveViewList(IN PCMHIVE Hive)
|
||||||
ASSERT(Hive->PinnedViews == 0);
|
ASSERT(Hive->PinnedViews == 0);
|
||||||
|
|
||||||
/* Now, free all the views inside the LRU View List */
|
/* Now, free all the views inside the LRU View List */
|
||||||
EntryList = RemoveHeadList(&Hive->LRUViewListHead);
|
while (!IsListEmpty(&Hive->LRUViewListHead))
|
||||||
while (EntryList != &Hive->LRUViewListHead)
|
|
||||||
{
|
{
|
||||||
|
EntryList = RemoveHeadList(&Hive->LRUViewListHead);
|
||||||
|
|
||||||
CmView = CONTAINING_RECORD(EntryList, CM_VIEW_OF_FILE, LRUViewList);
|
CmView = CONTAINING_RECORD(EntryList, CM_VIEW_OF_FILE, LRUViewList);
|
||||||
|
|
||||||
/* FIXME: Unmap the view if it is mapped */
|
/* FIXME: Unmap the view if it is mapped */
|
||||||
|
@ -71,14 +70,11 @@ CmpDestroyHiveViewList(IN PCMHIVE Hive)
|
||||||
ExFreePool(CmView);
|
ExFreePool(CmView);
|
||||||
|
|
||||||
Hive->MappedViews--;
|
Hive->MappedViews--;
|
||||||
|
|
||||||
EntryList = RemoveHeadList(&Hive->LRUViewListHead);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The LRU View List should be empty */
|
/* The LRU View List should be empty */
|
||||||
ASSERT(IsListEmpty(&Hive->LRUViewListHead) == TRUE);
|
ASSERT(IsListEmpty(&Hive->LRUViewListHead) == TRUE);
|
||||||
ASSERT(Hive->MappedViews == 0);
|
ASSERT(Hive->MappedViews == 0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue