block: Fix AioContext locking in bdrv_insert_node()
commit8823407c06a920eb2af217660094fdd8aff6c176
authorKevin Wolf <kwolf@redhat.com>
Thu, 25 May 2023 12:47:11 +0000 (25 14:47 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 30 May 2023 15:29:44 +0000 (30 17:29 +0200)
tree67251c7c3e1d3d283f83af4de82db03a023c11ca
parent8dc8a60c9e52fa446a5135180592c0cd4213acfb
block: Fix AioContext locking in bdrv_insert_node()

While calling bdrv_new_open_driver_opts(), the main AioContext lock must
be held, not the lock of the AioContext of the block subtree it will be
added to afterwards.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230525124713.401149-11-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c