block: Drop child_file

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200513110544.176672-33-mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Max Reitz 2020-05-13 13:05:42 +02:00 committed by Kevin Wolf
parent 9aab945e9c
commit f6de853fa3
3 changed files with 5 additions and 43 deletions

View file

@ -93,12 +93,10 @@ static void bdrv_test_child_perm(BlockDriverState *bs, BdrvChild *c,
uint64_t *nperm, uint64_t *nshared)
{
/*
* bdrv_default_perms() accepts only these two, so disguise
* detach_by_driver_cb_parent as one of them.
* bdrv_default_perms() accepts nothing else, so disguise
* detach_by_driver_cb_parent.
*/
if (child_class != &child_file && child_class != &child_of_bds) {
child_class = &child_of_bds;
}
child_class = &child_of_bds;
bdrv_default_perms(bs, c, child_class, role, reopen_queue,
perm, shared, nperm, nshared);