]> git.proxmox.com Git - mirror_qemu.git/commit - include/block/block-global-state.h
block: Mark bdrv_set_backing_hd_drained() GRAPH_WRLOCK
authorKevin Wolf <kwolf@redhat.com>
Fri, 27 Oct 2023 15:53:22 +0000 (17:53 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 7 Nov 2023 18:14:20 +0000 (19:14 +0100)
commitd0f9fd94d92c15c6ab7f6b8855acd812b80dbbaa
tree1c78f4e054a0c36cf75757fb8aa041ce7a59a797
parent78a9c76eefae877e63591728234604310c51d88f
block: Mark bdrv_set_backing_hd_drained() GRAPH_WRLOCK

Instead of taking the writer lock internally, require callers to already
hold it when calling bdrv_set_backing_hd_drained(). Basically everthing
in the function needs the lock and its callers may already want to hold
the graph lock and so wouldn't be able to call functions that take it
internally.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20231027155333.420094-14-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/stream.c
include/block/block-global-state.h