提交 95d72983 编写于 作者: J Jeff Cody 提交者: Kevin Wolf

block/vhdx: check error return of bdrv_truncate()

Signed-off-by: NJeff Cody <jcody@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 c6572fa0
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册