OSDN Git Service

block: Fix AioContext locking in bdrv_open_backing_file()
authorKevin Wolf <kwolf@redhat.com>
Mon, 5 Jun 2023 08:57:08 +0000 (10:57 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 28 Jun 2023 06:46:18 +0000 (08:46 +0200)
commit8aa045421979e59fa27cae6056471d33406a1eba
treee8a9d9e37dbcd59b6af71804e3a8132d9a1ff61b
parentf665f01f729680077fc0ff2e5489618d9ecc380e
block: Fix AioContext locking in bdrv_open_backing_file()

bdrv_set_backing() requires the caller to hold the AioContext lock for
@backing_hd. Take it in bdrv_open_backing_file() before calling the
function.

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