diff options
| author | Hanna Reitz <hreitz@redhat.com> | 2021-10-06 17:19:36 +0200 |
|---|---|---|
| committer | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-10-07 10:42:50 +0200 |
| commit | 20ad4d204accb27346b05b046ee8225c6725ef49 (patch) | |
| tree | b2b47fe625853804335c229ef3feaacde27bb1c9 | |
| parent | 08b83bff2a77e082d0b29680a40f0aaf9996bd16 (diff) | |
| download | focaccia-qemu-20ad4d204accb27346b05b046ee8225c6725ef49.tar.gz focaccia-qemu-20ad4d204accb27346b05b046ee8225c6725ef49.zip | |
mirror: Use job_is_cancelled()
mirror_drained_poll() returns true whenever the job is cancelled, because "we [can] be sure that it won't issue more requests". However, this is only true for force-cancelled jobs, so use job_is_cancelled(). Signed-off-by: Hanna Reitz <hreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20211006151940.214590-10-hreitz@redhat.com> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
| -rw-r--r-- | block/mirror.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/mirror.c b/block/mirror.c index 2d9642cb00..0eaba88060 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1184,7 +1184,7 @@ static bool mirror_drained_poll(BlockJob *job) * from one of our own drain sections, to avoid a deadlock waiting for * ourselves. */ - if (!s->common.job.paused && !s->common.job.cancelled && !s->in_drain) { + if (!s->common.job.paused && !job_is_cancelled(&job->job) && !s->in_drain) { return true; } |