mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
a4b740db5e
commit
1f051dcbdf
15 changed files with 97 additions and 41 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue