aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-10-07 13:59:09 +0200
committerKevin Wolf <kwolf@redhat.com>2014-10-20 13:41:26 +0200
commitb9fe8a7a12f18adebba5616a3e9f44143a78c07e (patch)
treed2c4505d21575b0242f28107db529de8db246fcf /blockdev.c
parent9ba10c95a4a63ef453893ba16bf1c8e11a1d3c39 (diff)
blockdev: Eliminate drive_del()
drive_del() has become a trivial wrapper around blk_unref(). Get rid of it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/blockdev.c b/blockdev.c
index 63f797b417..30382031b8 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -134,7 +134,7 @@ void blockdev_auto_del(BlockDriverState *bs)
DriveInfo *dinfo = blk_legacy_dinfo(blk);
if (dinfo && dinfo->auto_del) {
- drive_del(dinfo);
+ blk_unref(blk);
}
}
@@ -276,11 +276,6 @@ static void bdrv_format_print(void *opaque, const char *name)
error_printf(" %s", name);
}
-void drive_del(DriveInfo *dinfo)
-{
- blk_unref(dinfo->bdrv->blk);
-}
-
typedef struct {
QEMUBH *bh;
BlockDriverState *bs;
@@ -1867,7 +1862,7 @@ int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data)
bdrv_set_on_error(bs, BLOCKDEV_ON_ERROR_REPORT,
BLOCKDEV_ON_ERROR_REPORT);
} else {
- drive_del(dinfo);
+ blk_unref(blk);
}
aio_context_release(aio_context);