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>
This commit is contained in:
Emanuele Giuseppe Esposito 2022-03-03 10:16:02 -05:00 committed by Kevin Wolf
parent e2d9faf534
commit bdb734763b
2 changed files with 48 additions and 1 deletions

View file

@ -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;