mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -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
|
@ -1138,7 +1138,7 @@ out:
|
|||
/**
|
||||
* Check if the QED_F_NEED_CHECK bit should be set during allocating write
|
||||
*/
|
||||
static bool qed_should_set_need_check(BDRVQEDState *s)
|
||||
static bool GRAPH_RDLOCK qed_should_set_need_check(BDRVQEDState *s)
|
||||
{
|
||||
/* The flush before L2 update path ensures consistency */
|
||||
if (s->bs->backing) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue