This patch removes virCHDomainObjEndJob() and replaces it with call to the generalized virDomainObjEndJob(). Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx> --- src/ch/ch_domain.c | 18 ------------------ src/ch/ch_domain.h | 3 --- src/ch/ch_driver.c | 20 ++++++++++---------- 3 files changed, 10 insertions(+), 31 deletions(-) diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c index c592c6ffbb..dc666243a4 100644 --- a/src/ch/ch_domain.c +++ b/src/ch/ch_domain.c @@ -32,24 +32,6 @@ VIR_LOG_INIT("ch.ch_domain"); -/* - * obj must be locked and have a reference before calling - * - * To be called after completing the work associated with the - * earlier virDomainObjBeginJob() call - */ -void -virCHDomainObjEndJob(virDomainObj *obj) -{ - virDomainJob job = obj->job->active; - - VIR_DEBUG("Stopping job: %s", - virDomainJobTypeToString(job)); - - virDomainObjResetJob(obj->job); - virCondSignal(&obj->job->cond); -} - void virCHDomainRemoveInactive(virCHDriver *driver, virDomainObj *vm) diff --git a/src/ch/ch_domain.h b/src/ch/ch_domain.h index 076043f772..88e27d50b1 100644 --- a/src/ch/ch_domain.h +++ b/src/ch/ch_domain.h @@ -60,9 +60,6 @@ struct _virCHDomainVcpuPrivate { extern virDomainXMLPrivateDataCallbacks virCHDriverPrivateDataCallbacks; extern virDomainDefParserConfig virCHDriverDomainDefParserConfig; -void -virCHDomainObjEndJob(virDomainObj *obj); - void virCHDomainRemoveInactive(virCHDriver *driver, virDomainObj *vm); diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c index b089a7c9c7..43d6396af7 100644 --- a/src/ch/ch_driver.c +++ b/src/ch/ch_driver.c @@ -226,7 +226,7 @@ chDomainCreateXML(virConnectPtr conn, dom = virGetDomain(conn, vm->def->name, vm->def->uuid, vm->def->id); endjob: - virCHDomainObjEndJob(vm); + virDomainObjEndJob(vm); cleanup: if (vm && !dom) { @@ -256,7 +256,7 @@ chDomainCreateWithFlags(virDomainPtr dom, unsigned int flags) ret = virCHProcessStart(driver, vm, VIR_DOMAIN_RUNNING_BOOTED); - virCHDomainObjEndJob(vm); + virDomainObjEndJob(vm); cleanup: virDomainObjEndAPI(&vm); @@ -414,7 +414,7 @@ chDomainShutdownFlags(virDomainPtr dom, ret = 0; endjob: - virCHDomainObjEndJob(vm); + virDomainObjEndJob(vm); cleanup: virDomainObjEndAPI(&vm); @@ -473,7 +473,7 @@ chDomainReboot(virDomainPtr dom, unsigned int flags) ret = 0; endjob: - virCHDomainObjEndJob(vm); + virDomainObjEndJob(vm); cleanup: virDomainObjEndAPI(&vm); @@ -518,7 +518,7 @@ chDomainSuspend(virDomainPtr dom) ret = 0; endjob: - virCHDomainObjEndJob(vm); + virDomainObjEndJob(vm); cleanup: virDomainObjEndAPI(&vm); @@ -563,7 +563,7 @@ chDomainResume(virDomainPtr dom) ret = 0; endjob: - virCHDomainObjEndJob(vm); + virDomainObjEndJob(vm); cleanup: virDomainObjEndAPI(&vm); @@ -607,7 +607,7 @@ chDomainDestroyFlags(virDomainPtr dom, unsigned int flags) ret = 0; endjob: - virCHDomainObjEndJob(vm); + virDomainObjEndJob(vm); cleanup: virDomainObjEndAPI(&vm); @@ -1253,7 +1253,7 @@ chDomainPinVcpuFlags(virDomainPtr dom, ret = 0; endjob: - virCHDomainObjEndJob(vm); + virDomainObjEndJob(vm); cleanup: virDomainObjEndAPI(&vm); @@ -1417,7 +1417,7 @@ chDomainPinEmulator(virDomainPtr dom, ret = 0; endjob: - virCHDomainObjEndJob(vm); + virDomainObjEndJob(vm); cleanup: virDomainObjEndAPI(&vm); @@ -1679,7 +1679,7 @@ chDomainSetNumaParameters(virDomainPtr dom, ret = 0; endjob: - virCHDomainObjEndJob(vm); + virDomainObjEndJob(vm); cleanup: virDomainObjEndAPI(&vm); -- 2.37.1