From 48aef7944090fdddd6a89e07b790798cf31b56a4 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 3 Feb 2023 16:22:00 +0100 Subject: block: Mark bdrv_co_delete_file() and callers GRAPH_RDLOCK This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_co_delete_file() need to hold a reader lock for the graph. Signed-off-by: Kevin Wolf Message-Id: <20230203152202.49054-22-kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf --- block.c | 1 + 1 file changed, 1 insertion(+) (limited to 'block.c') diff --git a/block.c b/block.c index 1060194e8f..c4c67d09d4 100644 --- a/block.c +++ b/block.c @@ -740,6 +740,7 @@ int coroutine_fn bdrv_co_delete_file(BlockDriverState *bs, Error **errp) IO_CODE(); assert(bs != NULL); + assert_bdrv_graph_readable(); if (!bs->drv) { error_setg(errp, "Block node '%s' is not opened", bs->filename); -- cgit v1.2.3