mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
mirror: Require GRAPH_RDLOCK for accessing a node's parent list
This adds GRAPH_RDLOCK annotations to declare that functions accessing the parent list of a node need to hold a reader lock for the graph. As it happens, they already do. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230504115750.54437-13-kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
622d30af99
commit
9c93652da6
1 changed files with 1 additions and 1 deletions
|
@ -1416,7 +1416,7 @@ static MirrorOp *coroutine_fn active_write_prepare(MirrorBlockJob *s,
|
|||
return op;
|
||||
}
|
||||
|
||||
static void coroutine_fn active_write_settle(MirrorOp *op)
|
||||
static void coroutine_fn GRAPH_RDLOCK active_write_settle(MirrorOp *op)
|
||||
{
|
||||
uint64_t start_chunk = op->offset / op->s->granularity;
|
||||
uint64_t end_chunk = DIV_ROUND_UP(op->offset + op->bytes,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue