diff options
author | Kevin Wolf <kwolf@redhat.com> | 2023-09-29 16:51:48 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-10-12 16:31:33 +0200 |
commit | bd131d6705b6996f2cdccee3db017af570ce91ad (patch) | |
tree | 71c7238864b3f05e9b53407b94ed77085be04713 /block | |
parent | 4026f1c4f320aa072fa4cd299545cbc97315e246 (diff) | |
download | qemu-bd131d6705b6996f2cdccee3db017af570ce91ad.zip qemu-bd131d6705b6996f2cdccee3db017af570ce91ad.tar.gz qemu-bd131d6705b6996f2cdccee3db017af570ce91ad.tar.bz2 |
block: Mark bdrv_amend_options() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_amend_options() need to hold a reader lock for the graph. This
removes an assume_graph_lock() call in crypto's implementation.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20230929145157.45443-14-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/crypto.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/block/crypto.c b/block/crypto.c index c9c9a39..b3f0233 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -828,7 +828,7 @@ block_crypto_amend_options_generic_luks(BlockDriverState *bs, errp); } -static int +static int GRAPH_RDLOCK block_crypto_amend_options_luks(BlockDriverState *bs, QemuOpts *opts, BlockDriverAmendStatusCB *status_cb, @@ -841,8 +841,6 @@ block_crypto_amend_options_luks(BlockDriverState *bs, QCryptoBlockAmendOptions *amend_options = NULL; int ret = -EINVAL; - assume_graph_lock(); /* FIXME */ - assert(crypto); assert(crypto->block); |