summary refs log tree commit diff stats
path: root/block.c
diff options
context:
space:
mode:
authorFiona Ebner <f.ebner@proxmox.com>2025-05-30 17:11:24 +0200
committerKevin Wolf <kwolf@redhat.com>2025-07-14 15:42:27 +0200
commit2cf92b15cda38a34cd2508e5f51323e601a588d3 (patch)
treefc999dcae57e77361e44659e01fce8b52811136e /block.c
parentede0859311e46ca8654eaf11456e19868ac06c66 (diff)
downloadfocaccia-qemu-2cf92b15cda38a34cd2508e5f51323e601a588d3.tar.gz
focaccia-qemu-2cf92b15cda38a34cd2508e5f51323e601a588d3.zip
block: mark bdrv_open_child_common() and its callers GRAPH_UNLOCKED
The function bdrv_open_child_common() calls
bdrv_graph_wrlock_drained(), which must be called with the graph
unlocked. Mark it and its two callers bdrv_open_file_child() and
bdrv_open_child() as GRAPH_UNLOCKED. This requires temporarily
unlocking in vmdk_parse_extents() and making the locked section
shorter in vmdk_open().

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-ID: <20250530151125.955508-48-f.ebner@proxmox.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/block.c b/block.c
index 8d3dd5a8e3..8848e9a7ed 100644
--- a/block.c
+++ b/block.c
@@ -3766,13 +3766,12 @@ done:
     return bs;
 }
 
-static BdrvChild *bdrv_open_child_common(const char *filename,
-                                         QDict *options, const char *bdref_key,
-                                         BlockDriverState *parent,
-                                         const BdrvChildClass *child_class,
-                                         BdrvChildRole child_role,
-                                         bool allow_none, bool parse_filename,
-                                         Error **errp)
+static BdrvChild * GRAPH_UNLOCKED
+bdrv_open_child_common(const char *filename, QDict *options,
+                       const char *bdref_key, BlockDriverState *parent,
+                       const BdrvChildClass *child_class,
+                       BdrvChildRole child_role, bool allow_none,
+                       bool parse_filename, Error **errp)
 {
     BlockDriverState *bs;
     BdrvChild *child;