0572a9487c
fe89fd3b-storage-pool-deadlock.patch rhb#980676 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=287
53 lines
2.2 KiB
Diff
53 lines
2.2 KiB
Diff
commit fe89fd3b4071242ce9bbae6e1178fee30dc2f4f9
|
|
Author: Ján Tomko <jtomko@redhat.com>
|
|
Date: Thu Jul 4 14:41:46 2013 +0200
|
|
|
|
Unlock the storage volume object after looking it up
|
|
|
|
Introduced by c930410.
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=980676
|
|
|
|
Index: libvirt-1.1.0/src/storage/storage_driver.c
|
|
===================================================================
|
|
--- libvirt-1.1.0.orig/src/storage/storage_driver.c
|
|
+++ libvirt-1.1.0/src/storage/storage_driver.c
|
|
@@ -1361,15 +1361,16 @@ storageVolLookupByKey(virConnectPtr conn
|
|
virStorageVolDefFindByKey(driver->pools.objs[i], key);
|
|
|
|
if (vol) {
|
|
- if (virStorageVolLookupByKeyEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0)
|
|
+ if (virStorageVolLookupByKeyEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0) {
|
|
+ virStoragePoolObjUnlock(driver->pools.objs[i]);
|
|
goto cleanup;
|
|
+ }
|
|
|
|
ret = virGetStorageVol(conn,
|
|
driver->pools.objs[i]->def->name,
|
|
vol->name,
|
|
vol->key,
|
|
NULL, NULL);
|
|
- goto cleanup;
|
|
}
|
|
}
|
|
virStoragePoolObjUnlock(driver->pools.objs[i]);
|
|
@@ -1421,15 +1422,16 @@ storageVolLookupByPath(virConnectPtr con
|
|
VIR_FREE(stable_path);
|
|
|
|
if (vol) {
|
|
- if (virStorageVolLookupByPathEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0)
|
|
+ if (virStorageVolLookupByPathEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0) {
|
|
+ virStoragePoolObjUnlock(driver->pools.objs[i]);
|
|
goto cleanup;
|
|
+ }
|
|
|
|
ret = virGetStorageVol(conn,
|
|
driver->pools.objs[i]->def->name,
|
|
vol->name,
|
|
vol->key,
|
|
NULL, NULL);
|
|
- goto cleanup;
|
|
}
|
|
}
|
|
virStoragePoolObjUnlock(driver->pools.objs[i]);
|