mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-31 14:23:53 -06:00
block: Protect bs->backing with graph_lock
Almost all functions that access bs->backing 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-18-kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
ccd6a37947
commit
004915a96a
9 changed files with 70 additions and 27 deletions
|
@ -1178,7 +1178,7 @@ struct BlockDriverState {
|
|||
* are connected with BdrvChildRole.
|
||||
*/
|
||||
QLIST_HEAD(, BdrvChild GRAPH_RDLOCK_PTR) children;
|
||||
BdrvChild *backing;
|
||||
BdrvChild * GRAPH_RDLOCK_PTR backing;
|
||||
BdrvChild *file;
|
||||
|
||||
QLIST_HEAD(, BdrvChild GRAPH_RDLOCK_PTR) parents;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue