qcow2: Mark qcow2_inactivate() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of qcow2_inactivate() need to hold a reader lock for the graph because it calls bdrv_get_device_or_node_name(), which accesses the parents list of a node. qcow2_do_close() is a bit strange because it is called from different contexts. If close_data_file = true, we know that we were called from non-coroutine main loop context (more specifically, we're coming from qcow2_close()) and can safely drop the reader lock temporarily with bdrv_graph_rdunlock_main_loop() and acquire the writer lock. Signed-off-by:Kevin Wolf <kwolf@redhat.com> Message-ID: <20230929145157.45443-16-kwolf@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
Loading
Please register or sign in to comment