]> git.proxmox.com Git - mirror_qemu.git/commit
block: Mark bdrv_replace_child_noperm() GRAPH_WRLOCK
authorKevin Wolf <kwolf@redhat.com>
Mon, 11 Sep 2023 09:46:07 +0000 (11:46 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 20 Sep 2023 15:46:01 +0000 (17:46 +0200)
commitad29eb3ddc6ca0081a4d6fa8620ec2b8053e98b9
treeedee6c80bc9c8c97b82a5eb3a8752531133d249f
parentd21843491ac0edca0963d35306b31e17d70e017f
block: Mark bdrv_replace_child_noperm() GRAPH_WRLOCK

Instead of taking the writer lock internally, require callers to already
hold it when calling bdrv_replace_child_noperm(). These callers will
typically already hold the graph lock once the locking work is
completed, which means that they can't call functions that take it
internally.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20230911094620.45040-9-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c