mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
block: Use bdrv_make_empty() where possible
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200429141126.85159-3-mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
6ecbc6c526
commit
f844ec01b3
2 changed files with 2 additions and 5 deletions
|
@ -2960,9 +2960,7 @@ static int do_commit(BDRVVVFATState* s)
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (s->qcow->bs->drv && s->qcow->bs->drv->bdrv_make_empty) {
|
||||
s->qcow->bs->drv->bdrv_make_empty(s->qcow->bs);
|
||||
}
|
||||
bdrv_make_empty(s->qcow, NULL);
|
||||
|
||||
memset(s->used_clusters, 0, sector2cluster(s, s->sector_count));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue