]> git.proxmox.com Git - mirror_qemu.git/commit
block: continue until base is found in bdrv_freeze_backing_chain() et al
authorAlberto Garcia <berto@igalia.com>
Thu, 28 Mar 2019 16:25:09 +0000 (18:25 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 2 Apr 2019 10:04:44 +0000 (12:04 +0200)
commit0f0998f6219b25f54f8ab20e3803eff552af3b9c
treef19cdec7cdfeb82ff3766d513f11b72cdec673d0
parent696aaaed579ac5bf5fa336216909b46d3d8f07a8
block: continue until base is found in bdrv_freeze_backing_chain() et al

All three functions that handle the BdrvChild.frozen attribute walk
the backing chain from 'bs' to 'base' and stop either when 'base' is
found or at the end of the chain if 'base' is NULL.

However if 'base' is not found then the functions return without
errors as if it was NULL.

This is wrong: if the caller passed an incorrect parameter that means
that there is a bug in the code.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c