From b9e413dd3756f71abe4e8cafe1d7a459ce74ccf4 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 13 Feb 2017 14:52:32 +0100 Subject: block: explicitly acquire aiocontext in aio callbacks that need it Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Reviewed-by: Daniel P. Berrange Message-id: 20170213135235.12274-16-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi --- block/curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/curl.c') diff --git a/block/curl.c b/block/curl.c index f3f063bade..2939cc77e9 100644 --- a/block/curl.c +++ b/block/curl.c @@ -854,11 +854,11 @@ static void curl_readv_bh_cb(void *p) curl_multi_socket_action(s->multi, CURL_SOCKET_TIMEOUT, 0, &running); out: + aio_context_release(ctx); if (ret != -EINPROGRESS) { acb->common.cb(acb->common.opaque, ret); qemu_aio_unref(acb); } - aio_context_release(ctx); } static BlockAIOCB *curl_aio_readv(BlockDriverState *bs, -- cgit v1.2.3