VirtualBox

Changeset 28770 in vbox for trunk/src


Ignore:
Timestamp:
Apr 26, 2010 4:59:53 PM (15 years ago)
Author:
vboxsync
Message:

Main/Snapshot+Medium: fix a medium locking and medium state bug

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MediumImpl.cpp

    r28587 r28770  
    38273827
    38283828        /* go to Deleting state, so that the medium is not actually locked */
    3829         rc = markForDeletion();
    3830         if (FAILED(rc))
    3831             throw rc;
     3829        if (m->state != MediumState_Deleting)
     3830        {
     3831            rc = markForDeletion();
     3832            if (FAILED(rc))
     3833                throw rc;
     3834        }
    38323835
    38333836        /* Build the medium lock list. */
  • trunk/src/VBox/Main/SnapshotImpl.cpp

    r28585 r28770  
    24362436                {
    24372437                    Assert(pMedium->getState() == MediumState_Deleting);
     2438                    /* No need to hold the lock any longer. */
     2439                    mLock.release();
    24382440                    rc = pMedium->deleteStorage(&aTask.pProgress,
    24392441                                                true /* aWait */,
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