From 5f9a6a08e8f65e01746d2485fc65a3a78e74865f Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 24 Apr 2018 17:10:12 +0200 Subject: job: Add job_dismiss() This moves block_job_dismiss() to the Job layer. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- blockdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'blockdev.c') 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); } -- cgit v1.2.3