Changeset 37119 in vbox
- Timestamp:
- May 17, 2011 7:41:10 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/VD.cpp
r37100 r37119 2721 2721 pIoStorage, pIoCtx, pfnComplete, pvUser, cbTransfer, rcReq)); 2722 2722 2723 RTCritSectEnter(&pDisk->CritSect); 2723 2724 Assert(pIoCtx->cbTransferLeft >= cbTransfer); 2724 2725 ASMAtomicSubU32(&pIoCtx->cbTransferLeft, cbTransfer); … … 2726 2727 2727 2728 if (pfnComplete) 2728 {2729 RTCritSectEnter(&pDisk->CritSect);2730 2729 rc = pfnComplete(pIoStorage->pVDIo->pBackendData, pIoCtx, pvUser, rcReq); 2731 RTCritSectLeave(&pDisk->CritSect);2732 }2733 2730 2734 2731 if (RT_SUCCESS(rc)) … … 2736 2733 else if (rc == VERR_VD_ASYNC_IO_IN_PROGRESS) 2737 2734 rc = VINF_SUCCESS; 2735 2736 RTCritSectLeave(&pDisk->CritSect); 2738 2737 2739 2738 return rc; … … 2777 2776 else 2778 2777 RTListMove(&ListIoCtxWaiting, &pMetaXfer->ListIoCtxWaiting); 2779 RTCritSectLeave(&pDisk->CritSect);2780 2778 2781 2779 /* Go through the waiting list and continue the I/O contexts. */ … … 2792 2790 2793 2791 if (pfnComplete) 2794 {2795 RTCritSectEnter(&pDisk->CritSect);2796 2792 rc = pfnComplete(pIoStorage->pVDIo->pBackendData, pIoCtx, pvUser, rcReq); 2797 RTCritSectLeave(&pDisk->CritSect);2798 }2799 2793 2800 2794 LogFlow(("Completion callback for I/O context %#p returned %Rrc\n", pIoCtx, rc)); … … 2812 2806 if (RT_SUCCESS(rcReq) && !fFlush) 2813 2807 { 2814 RTCritSectEnter(&pDisk->CritSect);2815 2808 pMetaXfer->cRefs--; 2816 2809 if (!pMetaXfer->cRefs && RTListIsEmpty(&pMetaXfer->ListIoCtxWaiting)) … … 2822 2815 RTMemFree(pMetaXfer); 2823 2816 } 2824 RTCritSectLeave(&pDisk->CritSect);2825 2817 } 2826 2818 else if (fFlush) 2827 2819 RTMemFree(pMetaXfer); 2820 2821 RTCritSectLeave(&pDisk->CritSect); 2828 2822 2829 2823 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.