On 12/06/2017 08:45 AM, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > --- > blockdev.c | 42 ++++++++++++++++++++++++++++++++++-------- > 1 file changed, 34 insertions(+), 8 deletions(-) >
> @@ -1867,24 +1867,36 @@ static void drive_backup_prepare(BlkActionState > *common, Error **errp) > return; > } > > - /* AioContext is released in .clean() */ > - state->aio_context = bdrv_get_aio_context(bs); > - aio_context_acquire(state->aio_context); > + aio_context = bdrv_get_aio_context(bs); > + aio_context_acquire(aio_context); > + > + /* Paired with .clean() */ > bdrv_drained_begin(bs); > + > state->bs = bs; > > state->job = do_drive_backup(backup, common->block_job_txn, &local_err); > if (local_err) { > error_propagate(errp, local_err); > - return; > + goto out; > } > + > +out: > + aio_context_release(aio_context); Looks a bit funny to have a label with a single use that would fall through to the same location anyways. But it's fine from the future maintenance point of view, so no need to change it. Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature