diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2018-08-14 15:43:19 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-08-15 12:50:39 +0200 |
commit | 3c005293c2ace58c796b917a792c34c02c4d6433 (patch) | |
tree | c4227da60141c8cc9fcaf6fe3c809e59f91e0c93 /block | |
parent | 8d65a3ccfd5db7f0436e095cd952f5d0c3a873ba (diff) |
block: make .bdrv_close optional
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/snapshot.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/snapshot.c b/block/snapshot.c index f9903bc94e..3218a542df 100644 --- a/block/snapshot.c +++ b/block/snapshot.c @@ -218,7 +218,9 @@ int bdrv_snapshot_goto(BlockDriverState *bs, qobject_unref(file_options); qdict_put_str(options, "file", bdrv_get_node_name(file)); - drv->bdrv_close(bs); + if (drv->bdrv_close) { + drv->bdrv_close(bs); + } bdrv_unref_child(bs, bs->file); bs->file = NULL; |