diff options
| author | Emanuele Giuseppe Esposito <eesposit@redhat.com> | 2022-12-07 14:18:33 +0100 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2022-12-15 16:08:23 +0100 |
| commit | 3f35f82e04923affb3283b451b6d66880f266a5a (patch) | |
| tree | b28c543548b66253d259d7f14b777fd355cbf53a /block.c | |
| parent | 1af823923541ddfa0bfe51af5f40e9a8469e8992 (diff) | |
| download | focaccia-qemu-3f35f82e04923affb3283b451b6d66880f266a5a.tar.gz focaccia-qemu-3f35f82e04923affb3283b451b6d66880f266a5a.zip | |
block: assert that graph read and writes are performed correctly
Remove the old assert_bdrv_graph_writable, and replace it with the new version using graph-lock API. See the function documentation for more information. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20221207131838.239125-14-kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
| -rw-r--r-- | block.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block.c b/block.c index bdffadcdaa..ff53b41af3 100644 --- a/block.c +++ b/block.c @@ -1406,7 +1406,7 @@ static void bdrv_child_cb_attach(BdrvChild *child) { BlockDriverState *bs = child->opaque; - assert_bdrv_graph_writable(bs); + assert_bdrv_graph_writable(); QLIST_INSERT_HEAD(&bs->children, child, next); if (bs->drv->is_filter || (child->role & BDRV_CHILD_FILTERED)) { /* @@ -1452,7 +1452,7 @@ static void bdrv_child_cb_detach(BdrvChild *child) bdrv_backing_detach(child); } - assert_bdrv_graph_writable(bs); + assert_bdrv_graph_writable(); QLIST_REMOVE(child, next); if (child == bs->backing) { assert(child != bs->file); |