From 4f6fd3491cf0f768b135ed2e242bd1d1d2a2efec Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Fri, 23 Aug 2013 09:14:47 +0800 Subject: block: make bdrv_delete() static Manage BlockDriverState lifecycle with refcnt, so bdrv_delete() is no longer public and should be called by bdrv_unref() if refcnt is decreased to 0. This is an identical change because effectively, there's no multiple reference of BDS now: no caller of bdrv_ref() yet, only bdrv_new() sets bs->refcnt to 1, so all bdrv_unref() now actually delete the BDS. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/backup.c') diff --git a/block/backup.c b/block/backup.c index 23c7264..47fb23f 100644 --- a/block/backup.c +++ b/block/backup.c @@ -338,7 +338,7 @@ static void coroutine_fn backup_run(void *opaque) hbitmap_free(job->bitmap); bdrv_iostatus_disable(target); - bdrv_delete(target); + bdrv_unref(target); block_job_completed(&job->common, ret); } -- cgit v1.1