VirtualBox

Changeset 26181 in vbox


Ignore:
Timestamp:
Feb 3, 2010 4:58:18 AM (15 years ago)
Author:
vboxsync
Message:

pdmacFileEpCacheDestroy: Fixed lock order issue, conflicted with pdmacFileEpCacheRead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PDMAsyncCompletionFileCache.cpp

    r26147 r26181  
    275275
    276276        /* We can't evict pages which are currently in progress */
    277         if (!(pCurr->fFlags & PDMACFILECACHE_ENTRY_IO_IN_PROGRESS)
     277        if (   !(pCurr->fFlags & PDMACFILECACHE_ENTRY_IO_IN_PROGRESS)
    278278            && (ASMAtomicReadU32(&pCurr->cRefs) == 0))
    279279        {
     
    951951
    952952    /* Make sure nobody is accessing the cache while we delete the tree. */
     953    RTCritSectEnter(&pCache->CritSect);
    953954    RTSemRWRequestWrite(pEndpointCache->SemRWEntries, RT_INDEFINITE_WAIT);
    954     RTCritSectEnter(&pCache->CritSect);
    955955    RTAvlrFileOffsetDestroy(pEndpointCache->pTree, pdmacFileEpCacheEntryDestroy, pCache);
     956    RTSemRWReleaseWrite(pEndpointCache->SemRWEntries);
    956957    RTCritSectLeave(&pCache->CritSect);
    957     RTSemRWReleaseWrite(pEndpointCache->SemRWEntries);
    958958
    959959    RTSemRWDestroy(pEndpointCache->SemRWEntries);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette