提交 3b7f5895 编写于 作者: J Jim Fehlig

libxl: remove unneeded cleanup_unlock label

In the old days of a global driver lock, it was necessary to unlock
the driver after a domain restore operation.  When the global lock
was removed from the driver, some remnants were left behind in
libxlDomainRestoreFlags.  Remove this unneeded (and incorrect) code.
Signed-off-by: NJim Fehlig <jfehlig@suse.com>
上级 b1d159d8
...@@ -1464,17 +1464,17 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from, ...@@ -1464,17 +1464,17 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
fd = libxlDomainSaveImageOpen(driver, cfg, from, &def, &hdr); fd = libxlDomainSaveImageOpen(driver, cfg, from, &def, &hdr);
if (fd < 0) if (fd < 0)
goto cleanup_unlock; return -1;
if (virDomainRestoreFlagsEnsureACL(conn, def) < 0) if (virDomainRestoreFlagsEnsureACL(conn, def) < 0)
goto cleanup_unlock; goto cleanup;
if (!(vm = virDomainObjListAdd(driver->domains, def, if (!(vm = virDomainObjListAdd(driver->domains, def,
driver->xmlopt, driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_LIVE | VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE, VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL))) NULL)))
goto cleanup_unlock; goto cleanup;
def = NULL; def = NULL;
...@@ -1492,10 +1492,6 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from, ...@@ -1492,10 +1492,6 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
virObjectUnlock(vm); virObjectUnlock(vm);
virObjectUnref(cfg); virObjectUnref(cfg);
return ret; return ret;
cleanup_unlock:
libxlDriverUnlock(driver);
goto cleanup;
} }
static int static int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册