mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
libxl: remove unneeded locking of driver when restoring
libxlDomainRestoreFlags acquires the driver lock while reading the domain config from the save file and adding it to libxlDriverPrivatePtr->domains. But virDomainObjList provides self-locking APIs, so remove the needless driver locking. Signed-off-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
parent
778067e195
commit
630b645695
@ -1956,11 +1956,6 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Lock the driver until domain def is read from the saved
|
||||
image and a virDomainObj is created and locked.
|
||||
*/
|
||||
libxlDriverLock(driver);
|
||||
|
||||
fd = libxlSaveImageOpen(driver, cfg, from, &def, &hdr);
|
||||
if (fd < 0)
|
||||
goto cleanup_unlock;
|
||||
@ -1975,7 +1970,6 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
|
||||
NULL)))
|
||||
goto cleanup_unlock;
|
||||
|
||||
libxlDriverUnlock(driver);
|
||||
def = NULL;
|
||||
|
||||
ret = libxlVmStart(driver, vm, (flags & VIR_DOMAIN_SAVE_PAUSED) != 0, fd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user