]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Don't warn when releasing a released job
authorJiri Denemark <jdenemar@redhat.com>
Wed, 7 Dec 2022 11:33:13 +0000 (12:33 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 14 Dec 2022 10:21:37 +0000 (11:21 +0100)
When qemuDomainObjReleaseAsyncJob is called when the current async job
is already released we emit quite useless warning which was implemented
to warn about releasing a job owned by another thread.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_domainjob.c

index 4d320f075ee99042783a24f8a89e7084fde07a5b..8d958b9d21447b81249988ba97031ffc6f4e1f43 100644 (file)
@@ -647,7 +647,8 @@ qemuDomainObjReleaseAsyncJob(virDomainObj *obj)
     VIR_DEBUG("Releasing ownership of '%s' async job",
               virDomainAsyncJobTypeToString(obj->job->asyncJob));
 
-    if (obj->job->asyncOwner != virThreadSelfID()) {
+    if (obj->job->asyncOwner != 0 &&
+        obj->job->asyncOwner != virThreadSelfID()) {
         VIR_WARN("'%s' async job is owned by thread %llu",
                  virDomainAsyncJobTypeToString(obj->job->asyncJob),
                  obj->job->asyncOwner);