diff options
author | Kevin Wolf <kwolf@redhat.com> | 2023-10-27 17:53:33 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-11-08 17:56:18 +0100 |
commit | 1f051dcbdf2e4b6f518db731c84e304b2b9d15ce (patch) | |
tree | c96479cc14a8cc90443bc4f7fe46afbfa76a4006 /include | |
parent | a4b740db5ee3db0d5b76a6ea9895875763453187 (diff) | |
download | qemu-1f051dcbdf2e4b6f518db731c84e304b2b9d15ce.zip qemu-1f051dcbdf2e4b6f518db731c84e304b2b9d15ce.tar.gz qemu-1f051dcbdf2e4b6f518db731c84e304b2b9d15ce.tar.bz2 |
block: Protect bs->file with graph_lock
Almost all functions that access bs->file already take the graph
lock now. Add locking to the remaining users and finally annotate the
struct field itself as protected by the graph lock.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20231027155333.420094-25-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block_int-common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h index 63bc523..4e31d16 100644 --- a/include/block/block_int-common.h +++ b/include/block/block_int-common.h @@ -1181,7 +1181,7 @@ struct BlockDriverState { */ QLIST_HEAD(, BdrvChild GRAPH_RDLOCK_PTR) children; BdrvChild * GRAPH_RDLOCK_PTR backing; - BdrvChild *file; + BdrvChild * GRAPH_RDLOCK_PTR file; QLIST_HEAD(, BdrvChild GRAPH_RDLOCK_PTR) parents; |