]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2.c
block: Mark bdrv_unref_child() GRAPH_WRLOCK
authorKevin Wolf <kwolf@redhat.com>
Mon, 11 Sep 2023 09:46:19 +0000 (11:46 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 20 Sep 2023 15:46:01 +0000 (17:46 +0200)
commit32a8aba37eaae54d3a0a7ae5e93e3e157525660a
treec310d966906d71c635c89425f2e1f314dfafdba9
parentede01e4635050a395eacd57b7d7fbea8ea208704
block: Mark bdrv_unref_child() GRAPH_WRLOCK

Instead of taking the writer lock internally, require callers to already
hold it when calling bdrv_unref_child(). These callers will typically
already hold the graph lock once the locking work is completed, which
means that they can't call functions that take it internally.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20230911094620.45040-21-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/blklogwrites.c
block/blkverify.c
block/qcow2.c
block/quorum.c
block/replication.c
block/snapshot.c
block/vmdk.c
include/block/block-global-state.h
tests/unit/test-bdrv-drain.c