Changeset 38764 in vbox for trunk/src/VBox
- Timestamp:
- Sep 15, 2011 2:09:40 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 74046
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
r38535 r38764 660 660 NULL); /* pllRegistriesThatNeedSaving */ 661 661 if (FAILED(rc)) throw rc; 662 663 // need tree lock for createMediumLockList 664 AutoWriteLock treeLock(p->getVirtualBox()->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 665 662 666 MediumLockList *pMediumLockList(new MediumLockList()); 663 667 rc = diff->createMediumLockList(true /* fFailIfInaccessible */, … … 668 672 rc = pMediumLockList->Lock(); 669 673 if (FAILED(rc)) throw rc; 674 675 treeLock.release(); 676 670 677 /* this already registers the new diff image */ 671 678 rc = pParent->createDiffStorage(diff, MediumVariant_Standard, -
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r38744 r38764 1049 1049 if (fForceNewUuid) 1050 1050 unconst(m->uuidImage).create(); 1051 rc = queryInfo(fForceNewUuid /* fSetImageId */, false /* fSetParentId */); 1051 1052 { 1053 // Medium::queryInfo needs write lock 1054 AutoWriteLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 1055 rc = queryInfo(fForceNewUuid /* fSetImageId */, false /* fSetParentId */); 1056 } 1052 1057 1053 1058 if (SUCCEEDED(rc)) … … 1955 1960 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1956 1961 1957 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1962 AutoMultiWriteLock2 alock(&m->pVirtualBox->getMediaTreeLockHandle(), 1963 this->lockHandle() COMMA_LOCKVAL_SRC_POS); 1958 1964 1959 1965 switch (m->state)
Note:
See TracChangeset
for help on using the changeset viewer.