提交 630b6456 编写于 作者: J Jim Fehlig

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: NJim Fehlig <jfehlig@suse.com>
上级 778067e1
...@@ -1956,11 +1956,6 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from, ...@@ -1956,11 +1956,6 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
return -1; 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); fd = libxlSaveImageOpen(driver, cfg, from, &def, &hdr);
if (fd < 0) if (fd < 0)
goto cleanup_unlock; goto cleanup_unlock;
...@@ -1975,7 +1970,6 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from, ...@@ -1975,7 +1970,6 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
NULL))) NULL)))
goto cleanup_unlock; goto cleanup_unlock;
libxlDriverUnlock(driver);
def = NULL; def = NULL;
ret = libxlVmStart(driver, vm, (flags & VIR_DOMAIN_SAVE_PAUSED) != 0, fd); ret = libxlVmStart(driver, vm, (flags & VIR_DOMAIN_SAVE_PAUSED) != 0, fd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册