From 7c735873d93ac18a6f06850c7ca6b3722b1b32c5 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Wed, 16 Mar 2016 19:54:39 +0100 Subject: 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 Signed-off-by: Kevin Wolf --- block/block-backend.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'block') diff --git a/block/block-backend.c b/block/block-backend.c index 9ed3912..68f3662 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -386,23 +386,6 @@ BlockBackend *blk_by_legacy_dinfo(DriveInfo *dinfo) } /* - * 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. */ void blk_remove_bs(BlockBackend *blk) -- cgit v1.1