blockdev: Remove blk_hide_on_behalf_of_hmp_drive_del()

We can basically inline it in hmp_drive_del(); monitor_remove_blk() is
called already, so we just need to call bdrv_make_anon(), too.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Max Reitz 2016-03-16 19:54:39 +01:00 committed by Kevin Wolf
parent efaa7c4eeb
commit 7c735873d9
3 changed files with 6 additions and 24 deletions

View file

@ -385,23 +385,6 @@ BlockBackend *blk_by_legacy_dinfo(DriveInfo *dinfo)
abort();
}
/*
* Hide @blk.
* @blk must not have been hidden already.
* Make attached BlockDriverState, if any, anonymous.
* Once hidden, @blk is invisible to all functions that don't receive
* it as argument. For example, blk_by_name() won't return it.
* Strictly for use by do_drive_del().
* TODO get rid of it!
*/
void blk_hide_on_behalf_of_hmp_drive_del(BlockBackend *blk)
{
monitor_remove_blk(blk);
if (blk->bs) {
bdrv_make_anon(blk->bs);
}
}
/*
* Disassociates the currently associated BlockDriverState from @blk.
*/