mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
storage: Fix deadlock when cloning across pools.
We need to unlock the first pool before looking up the second, since the search locks every pool it checks.
This commit is contained in:
parent
a500d73ac0
commit
045176bf35
@ -1327,9 +1327,11 @@ storageVolumeCreateXMLFrom(virStoragePoolPtr obj,
|
||||
|
||||
storageDriverLock(driver);
|
||||
pool = virStoragePoolObjFindByUUID(&driver->pools, obj->uuid);
|
||||
if (diffpool)
|
||||
if (diffpool) {
|
||||
virStoragePoolObjUnlock(pool);
|
||||
origpool = virStoragePoolObjFindByName(&driver->pools, vobj->pool);
|
||||
else
|
||||
virStoragePoolObjLock(pool);
|
||||
} else
|
||||
origpool = pool;
|
||||
storageDriverUnlock(driver);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user