projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6572fa
)
block/vhdx: check error return of bdrv_truncate()
author
Jeff Cody
<jcody@redhat.com>
Mon, 7 Aug 2017 12:38:22 +0000
(08:38 -0400)
committer
Kevin Wolf
<kwolf@redhat.com>
Tue, 8 Aug 2017 12:37:00 +0000
(14:37 +0200)
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vhdx-log.c
patch
|
blob
|
history
diff --git
a/block/vhdx-log.c
b/block/vhdx-log.c
index a27dc059cdcdadf27359c792fbf1072ad890b9d7..14b724ef7bc4b9bbdc7e520b29dcfd0f78626e4e 100644
(file)
--- a/
block/vhdx-log.c
+++ b/
block/vhdx-log.c
@@
-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);