]> git.proxmox.com Git - mirror_qemu.git/commit
block: Mark bdrv_add/del_child() and caller GRAPH_WRLOCK
authorKevin Wolf <kwolf@redhat.com>
Mon, 11 Sep 2023 09:46:20 +0000 (11:46 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 20 Sep 2023 15:46:01 +0000 (17:46 +0200)
commit9def6082cf885fbb2e8e719d5055109c8a04b885
tree33f5abf2dbe6ab2397bb613452f42ec9bf60616a
parent32a8aba37eaae54d3a0a7ae5e93e3e157525660a
block: Mark bdrv_add/del_child() and caller GRAPH_WRLOCK

The functions read the parents list in the generic block layer, so we
need to hold the graph lock already there. The BlockDriver
implementations actually modify the graph, so it has to be a writer
lock.

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-22-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/quorum.c
blockdev.c
include/block/block-global-state.h
include/block/block_int-common.h