]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block_job_query: remove atomic read
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>
Mon, 26 Sep 2022 09:32:12 +0000 (05:32 -0400)
committerKevin Wolf <kwolf@redhat.com>
Fri, 7 Oct 2022 10:11:41 +0000 (12:11 +0200)
Not sure what the atomic here was supposed to do, since job.busy
is protected by the job lock. Since the whole function
is called under job_mutex, just remove the atomic.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20220926093214.506243-20-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockjob.c

index d04f8040017b528fc654285917b0158e45581353..120c1b7ead5b28d257dd472b237e6ec2f6feeb87 100644 (file)
@@ -338,7 +338,7 @@ BlockJobInfo *block_job_query_locked(BlockJob *job, Error **errp)
     info = g_new0(BlockJobInfo, 1);
     info->type      = g_strdup(job_type_str(&job->job));
     info->device    = g_strdup(job->job.id);
-    info->busy      = qatomic_read(&job->job.busy);
+    info->busy      = job->job.busy;
     info->paused    = job->job.pause_count > 0;
     info->offset    = progress_current;
     info->len       = progress_total;