Changeset 78585 in vbox for trunk/src/VBox
- Timestamp:
- May 19, 2019 12:35:21 AM (6 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/SharedFolders/driver
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/file.cpp
r78584 r78585 128 128 LARGE_INTEGER offFlush; 129 129 offFlush.QuadPart = offFile; 130 Assert(!RxContext->FcbPagingIoResourceAcquired); 131 BOOLEAN AcquiredFile = RxAcquirePagingIoResourceShared(NULL, capFcb, 1 /*fWait*/); 130 132 g_pfnCcCoherencyFlushAndPurgeCache(&RxContext->NonPagedFcb->SectionObjectPointers, &offFlush, cbChunk, 131 133 &RxContext->CurrentIrp->IoStatus, CC_FLUSH_AND_PURGE_NO_PURGE); 134 if (AcquiredFile) 135 { RxReleasePagingIoResource(NULL, capFcb); /* requires {} */ } 132 136 } 133 137 … … 383 387 && RxContext->NonPagedFcb->SectionObjectPointers.DataSectionObject != NULL) 384 388 { 385 /** @todo locking. */386 389 LARGE_INTEGER offFlush; 387 390 offFlush.QuadPart = offFile; 391 BOOLEAN fAcquiredLock = RxAcquirePagingIoResource(NULL, capFcb); 388 392 g_pfnCcCoherencyFlushAndPurgeCache(&RxContext->NonPagedFcb->SectionObjectPointers, &offFlush, cbChunk, 389 393 &RxContext->CurrentIrp->IoStatus, 0 /*fFlags*/); 394 if (fAcquiredLock) 395 { RxReleasePagingIoResource(NULL, capFcb); /* requires {} */ } 390 396 } 391 397 -
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/info.cpp
r78569 r78585 1162 1162 * macros in need of {} wrappers when used with if statements. 1163 1163 */ 1164 NTSTATUS rcNtLock = RxAcquirePagingIoResource(NULL, pFcb);1164 BOOLEAN fAcquiredLock = RxAcquirePagingIoResource(NULL, pFcb); 1165 1165 1166 1166 LONGLONG cbFileOldRecheck; … … 1211 1211 1212 1212 /* RDBSS leave the lock before calling CcSetFileSizes, so we do that too then.*/ 1213 if (NT_SUCCESS(rcNtLock)) 1214 { 1215 RxReleasePagingIoResource(NULL, pFcb); 1216 } 1213 if (fAcquiredLock) 1214 { RxReleasePagingIoResource(NULL, pFcb); /* requires {} */ } 1217 1215 1218 1216 __try … … 1242 1240 cbFileOld, cbFileNew, cbFileOldRecheck)); 1243 1241 1244 if (NT_SUCCESS(rcNtLock)) 1245 { 1246 RxReleasePagingIoResource(NULL, pFcb); /* requires {} */ 1247 } 1242 if (fAcquiredLock) 1243 { RxReleasePagingIoResource(NULL, pFcb); /* requires {} */ } 1248 1244 } 1249 1245
Note:
See TracChangeset
for help on using the changeset viewer.