block/vhdx: check error return of bdrv_truncate()
Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
c6572fa0d2
commit
95d729835f
@ -558,7 +558,11 @@ static int vhdx_log_flush(BlockDriverState *bs, BDRVVHDXState *s,
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
bdrv_truncate(bs->file, new_file_size, PREALLOC_MODE_OFF, NULL);
|
||||
ret = bdrv_truncate(bs->file, new_file_size, PREALLOC_MODE_OFF,
|
||||
NULL);
|
||||
if (ret < 0) {
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
qemu_vfree(desc_entries);
|
||||
|
Loading…
Reference in New Issue
Block a user