VirtualBox

Changeset 52168 in vbox


Ignore:
Timestamp:
Jul 24, 2014 1:43:46 PM (11 years ago)
Author:
vboxsync
Message:

Main/VirtualBox+Medium+Snapshot: fix lock inconsistency which crept into the previous fixes

Location:
trunk/src/VBox/Main/src-server
Files:
3 edited

Legend:

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

    r52095 r52168  
    82868286
    82878287            if (FAILED(mrc))
    8288             {
    8289                 treeLock.acquire();
    82908288                /* break parent association on failure to register */
    82918289                this->i_deparent();     // removes target from parent
    8292             }
    82938290        }
    82948291        else
  • trunk/src/VBox/Main/src-server/SnapshotImpl.cpp

    r52095 r52168  
    34713471        rc = mParent->i_registerMedium(pDeleteRec->mpTarget, &pDeleteRec->mpTarget, DeviceType_HardDisk, treeLock);
    34723472        AssertComRC(rc);
    3473         treeLock.acquire();
    34743473    }
    34753474    else
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r52095 r52168  
    42514251    }
    42524252
     4253    // Restore the initial lock state, so that no unexpected lock changes are
     4254    // done by this method, which would need adjustments everywhere.
     4255    mediaTreeLock.acquire();
     4256
    42534257    return rc;
    42544258}
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