mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
9ba10c95a4
commit
b9fe8a7a12
4 changed files with 7 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue