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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user