summaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-03-18 10:46:57 +0100
committerKevin Wolf <kwolf@redhat.com>2016-03-30 11:59:32 +0200
commit63eaaae08cb7738311f73d1a7e6e6a68ddf60688 (patch)
tree905d22ce4c2b0dc489c94534498ebc63166d3f23 /blockdev.c
parent553934db664ecee676650fac0330dceff3531736 (diff)
downloadqemu-63eaaae08cb7738311f73d1a7e6e6a68ddf60688.zip
block: Remove bdrv_make_anon()
The call in hmp_drive_del() is dead code because blk_remove_bs() is called a few lines above. The only other remaining user is bdrv_delete(), which only abuses bdrv_make_anon() to remove it from the named nodes list. This path inlines the list entry removal into bdrv_delete() and removes bdrv_make_anon(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/blockdev.c b/blockdev.c
index 3eb05d1a90..efb1107e80 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2869,9 +2869,6 @@ void hmp_drive_del(Monitor *mon, const QDict *qdict)
/* Make the BlockBackend and the attached BlockDriverState anonymous */
monitor_remove_blk(blk);
- if (blk_bs(blk)) {
- bdrv_make_anon(blk_bs(blk));
- }
/* If this BlockBackend has a device attached to it, its refcount will be
* decremented when the device is removed; otherwise we have to do so here.