mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
block: Mark bdrv_refresh_filename() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_refresh_filename() need to hold a reader lock for the graph because it accesses the children list of a node. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20230929145157.45443-11-kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
@ -505,7 +505,9 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
|
||||
BDRV_REQ_ZERO_WRITE;
|
||||
|
||||
if (bs->probed && !bdrv_is_read_only(bs)) {
|
||||
bdrv_graph_rdlock_main_loop();
|
||||
bdrv_refresh_filename(bs->file->bs);
|
||||
bdrv_graph_rdunlock_main_loop();
|
||||
fprintf(stderr,
|
||||
"WARNING: Image format was not specified for '%s' and probing "
|
||||
"guessed raw.\n"
|
||||
|
Reference in New Issue
Block a user