block: Mark bdrv_child_perm() GRAPH_RDLOCK
commitc629b6d22349c83ca262d1887c0920e87ec0bfdb
authorKevin Wolf <kwolf@redhat.com>
Mon, 11 Sep 2023 09:46:14 +0000 (11 11:46 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 20 Sep 2023 15:46:01 +0000 (20 17:46 +0200)
treed01ba675a1fc176525163176d368f5f37fd0a3fb
parentbce73bc25bd0aa1fee21b37980c8f04b49c6b44b
block: Mark bdrv_child_perm() GRAPH_RDLOCK

This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_child_perm() need to hold a reader lock for the graph because
some implementations access the children list of a node.

The callers of bdrv_child_perm() conveniently already hold the lock.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20230911094620.45040-16-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/copy-before-write.c
include/block/block_int-common.h