From 067179868ec8cd467d9810143339e882cb60e388 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 27 Oct 2023 17:53:11 +0200 Subject: block: Mark bdrv_has_zero_init() and callers GRAPH_RDLOCK This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_has_zero_init() need to hold a reader lock for the graph because it calls bdrv_filter_bs(), which accesses bs->file/backing. Signed-off-by: Kevin Wolf Message-ID: <20231027155333.420094-3-kwolf@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/vdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/vdi.c') diff --git a/block/vdi.c b/block/vdi.c index 7cfd12b50d..8e144ce523 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -990,7 +990,7 @@ static void vdi_close(BlockDriverState *bs) migrate_del_blocker(&s->migration_blocker); } -static int vdi_has_zero_init(BlockDriverState *bs) +static int GRAPH_RDLOCK vdi_has_zero_init(BlockDriverState *bs) { BDRVVdiState *s = bs->opaque; -- cgit v1.2.3