mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
block: Mark bdrv_filter_or_cow_bs() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_filter_or_cow_bs() need to hold a reader lock for the graph because it calls bdrv_filter_or_cow_child(), which accesses bs->file/backing. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20231027155333.420094-7-kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
@ -2501,8 +2501,8 @@ void qmp_block_stream(const char *job_id, const char *device,
|
||||
/*
|
||||
* Check for op blockers in the whole chain between bs and base (or bottom)
|
||||
*/
|
||||
iter_end = bottom ? bdrv_filter_or_cow_bs(bottom_bs) : base_bs;
|
||||
bdrv_graph_rdlock_main_loop();
|
||||
iter_end = bottom ? bdrv_filter_or_cow_bs(bottom_bs) : base_bs;
|
||||
for (iter = bs; iter && iter != iter_end;
|
||||
iter = bdrv_filter_or_cow_bs(iter))
|
||||
{
|
||||
|
Reference in New Issue
Block a user