summaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-04-24 17:10:12 +0200
committerKevin Wolf <kwolf@redhat.com>2018-05-23 14:30:51 +0200
commit5f9a6a08e8f65e01746d2485fc65a3a78e74865f (patch)
tree48101bce5087ce23d966590f75d9697f837e0b0a /blockdev.c
parent198c49cc8d81e8eb0df3749d395599895c3a3a76 (diff)
downloadqemu-5f9a6a08e8f65e01746d2485fc65a3a78e74865f.tar.gz
job: Add job_dismiss()
This moves block_job_dismiss() to the Job layer. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/blockdev.c b/blockdev.c
index 31319a6d5a..8de95be8f4 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3915,14 +3915,16 @@ void qmp_block_job_finalize(const char *id, Error **errp)
void qmp_block_job_dismiss(const char *id, Error **errp)
{
AioContext *aio_context;
- BlockJob *job = find_block_job(id, &aio_context, errp);
+ BlockJob *bjob = find_block_job(id, &aio_context, errp);
+ Job *job;
- if (!job) {
+ if (!bjob) {
return;
}
- trace_qmp_block_job_dismiss(job);
- block_job_dismiss(&job, errp);
+ trace_qmp_block_job_dismiss(bjob);
+ job = &bjob->job;
+ job_dismiss(&job, errp);
aio_context_release(aio_context);
}