diff options
author | Kevin Wolf <kwolf@redhat.com> | 2023-09-29 16:51:54 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-10-12 16:31:33 +0200 |
commit | 3574499a1e5e420c3e72d0e283cfb2b13bce672e (patch) | |
tree | c2768e9ced1818ce93874979c8d614c6d49c06b9 /block | |
parent | 018f9dea9c905506c49f8f37c018470dddfc50f1 (diff) |
block: Mark bdrv_get_specific_info() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_get_specific_info() need to hold a reader lock for the graph.
This removes an assume_graph_lock() call in vmdk's implementation.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20230929145157.45443-20-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/vmdk.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/block/vmdk.c b/block/vmdk.c index e50965bc37..8a3b152798 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -2990,16 +2990,14 @@ vmdk_co_check(BlockDriverState *bs, BdrvCheckResult *result, BdrvCheckMode fix) return ret; } -static ImageInfoSpecific *vmdk_get_specific_info(BlockDriverState *bs, - Error **errp) +static ImageInfoSpecific * GRAPH_RDLOCK +vmdk_get_specific_info(BlockDriverState *bs, Error **errp) { int i; BDRVVmdkState *s = bs->opaque; ImageInfoSpecific *spec_info = g_new0(ImageInfoSpecific, 1); VmdkExtentInfoList **tail; - assume_graph_lock(); /* FIXME */ - *spec_info = (ImageInfoSpecific){ .type = IMAGE_INFO_SPECIFIC_KIND_VMDK, .u = { |