On 2018-05-09 18:26, Kevin Wolf wrote: > This moves block_job_dismiss() to the Job layer. > > Signed-off-by: Kevin Wolf > --- > include/block/blockjob.h | 9 --------- > include/qemu/job.h | 7 ++++++- > blockdev.c | 8 +++++--- > blockjob.c | 13 ------------- > job.c | 15 ++++++++++++++- > tests/test-blockjob.c | 4 ++-- > 6 files changed, 27 insertions(+), 29 deletions(-) [...] > diff --git a/blockdev.c b/blockdev.c > index 31319a6d5a..15753d9719 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; clang (probably gcc as well if I had enabled tracing in that build...) complains that this should be initialized to NULL because of... > > - if (!job) { > + if (!bjob) { > return; > } > > trace_qmp_block_job_dismiss(job); ...this. Max > - block_job_dismiss(&job, errp); > + job = &bjob->job; > + job_dismiss(&job, errp); > aio_context_release(aio_context); > } >