diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2023-03-23 10:58:53 -0400 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-03-27 13:46:30 +0200 |
commit | 2957dc40a270cd41a3932f96f0f63ac9c1e3a9be (patch) | |
tree | 7680cbcc3223a4f789b23254b64b229c3a01aca2 /util | |
parent | bd2cd4a441ded163b62371790876f28a9b834317 (diff) | |
download | qemu-2957dc40a270cd41a3932f96f0f63ac9c1e3a9be.zip qemu-2957dc40a270cd41a3932f96f0f63ac9c1e3a9be.tar.gz qemu-2957dc40a270cd41a3932f96f0f63ac9c1e3a9be.tar.bz2 |
block/export: only acquire AioContext once for vhost_user_server_stop()
vhost_user_server_stop() uses AIO_WAIT_WHILE(). AIO_WAIT_WHILE()
requires that AioContext is only acquired once.
Since blk_exp_request_shutdown() already acquires the AioContext it
shouldn't be acquired again in vhost_user_server_stop().
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230323145853.1345527-1-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/vhost-user-server.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index 40f36ea..5b62160 100644 --- a/util/vhost-user-server.c +++ b/util/vhost-user-server.c @@ -346,10 +346,9 @@ static void vu_accept(QIONetListener *listener, QIOChannelSocket *sioc, aio_context_release(server->ctx); } +/* server->ctx acquired by caller */ void vhost_user_server_stop(VuServer *server) { - aio_context_acquire(server->ctx); - qemu_bh_delete(server->restart_listener_bh); server->restart_listener_bh = NULL; @@ -366,8 +365,6 @@ void vhost_user_server_stop(VuServer *server) AIO_WAIT_WHILE(server->ctx, server->co_trip); } - aio_context_release(server->ctx); - if (server->listener) { qio_net_listener_disconnect(server->listener); object_unref(OBJECT(server->listener)); |