]> git.proxmox.com Git - mirror_qemu.git/commit - block.c
block: Fix AioContext locking in bdrv_open_child()
authorKevin Wolf <kwolf@redhat.com>
Mon, 5 Jun 2023 08:57:04 +0000 (10:57 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 28 Jun 2023 06:46:10 +0000 (08:46 +0200)
commit8394c35ee14861e2dd2afb20b03036b86388e375
tree5aad93a5410b132e2c961c1db758bf761d759f53
parent2065cf6b2354265b2870d01e561bd374b67280d0
block: Fix AioContext locking in bdrv_open_child()

bdrv_attach_child() requires that the caller holds the AioContext lock
for the new child node. Take it in bdrv_open_child() and document that
the caller must not hold any AioContext apart from the main AioContext.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20230605085711.21261-5-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c