diff options
author | Emanuele Giuseppe Esposito <eesposit@redhat.com> | 2022-03-03 10:16:02 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2022-03-04 18:18:25 +0100 |
commit | bdb734763bcee8cfe2b6d70944ee4ae75987a6c6 (patch) | |
tree | d33a50cdb33cd848762895f54a5ffd2390ab055e /block | |
parent | e2d9faf534eb4218e2c3dbe18488f6a97fc7179b (diff) |
block.c: add assertions to static functions
Following the assertion derived from the API split,
propagate the assertion also in the static functions.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20220303151616.325444-18-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/block-backend.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index 7d2181ec01..2ab1274dfe 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -767,6 +767,9 @@ BlockDriverState *blk_bs(BlockBackend *blk) static BlockBackend *bdrv_first_blk(BlockDriverState *bs) { BdrvChild *child; + + GLOBAL_STATE_CODE(); + QLIST_FOREACH(child, &bs->parents, next_parent) { if (child->klass == &child_root) { return child->opaque; |