diff options
Diffstat (limited to 'block/blkdebug.c')
-rw-r--r-- | block/blkdebug.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c index 67e8024e36..d2a7561c4c 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -389,14 +389,12 @@ static int blkdebug_open(BlockDriverState *bs, QDict *options, int flags, } else if (align) { error_setg(errp, "Invalid alignment"); ret = -EINVAL; - goto fail_unref; + goto out; } ret = 0; goto out; -fail_unref: - bdrv_unref_child(bs, bs->file); out: if (ret < 0) { g_free(s->config_file); @@ -661,9 +659,9 @@ static int64_t blkdebug_getlength(BlockDriverState *bs) return bdrv_getlength(bs->file->bs); } -static int blkdebug_truncate(BlockDriverState *bs, int64_t offset) +static int blkdebug_truncate(BlockDriverState *bs, int64_t offset, Error **errp) { - return bdrv_truncate(bs->file, offset); + return bdrv_truncate(bs->file, offset, errp); } static void blkdebug_refresh_filename(BlockDriverState *bs, QDict *options) |