block: Mark bdrv_primary_child() and callers GRAPH_RDLOCK
commitc0fc5123ad33158f6f289a896b568b9adce7d1f2
authorKevin Wolf <kwolf@redhat.com>
Fri, 29 Sep 2023 14:51:46 +0000 (29 16:51 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 12 Oct 2023 14:31:33 +0000 (12 16:31 +0200)
treea589f4e13760c298ed3b8c057f756b10a89ccf77
parentb7cfc7d58ec697a681a269036dc8f6444ffd495d
block: Mark bdrv_primary_child() and callers GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_primary_child() 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-12-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/snapshot.c
include/block/block_int-io.h