[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/30] qcow2: Move error check of local_err near its assignment
From: |
Kevin Wolf |
Subject: |
[PULL 17/30] qcow2: Move error check of local_err near its assignment |
Date: |
Thu, 19 Dec 2019 18:24:28 +0100 |
From: Tuguoyi <address@hidden>
The local_err check outside of the if block was necessary
when it was introduced in commit d1258dd0c87 because it needed to be
executed even if qcow2_load_autoloading_dirty_bitmaps() returned false.
After some modifications that all required the error check to remain
where it is, commit 9c98f145dfb finally moved the
qcow2_load_dirty_bitmaps() call into the if block, so now the error
check should be there, too.
Signed-off-by: Guoyi Tu <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 375bbd0ad3..7fbaac8457 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1705,14 +1705,14 @@ static int coroutine_fn qcow2_do_open(BlockDriverState
*bs, QDict *options,
if (!(bdrv_get_flags(bs) & BDRV_O_INACTIVE)) {
/* It's case 1, 2 or 3.2. Or 3.1 which is BUG in management layer. */
bool header_updated = qcow2_load_dirty_bitmaps(bs, &local_err);
+ if (local_err != NULL) {
+ error_propagate(errp, local_err);
+ ret = -EINVAL;
+ goto fail;
+ }
update_header = update_header && !header_updated;
}
- if (local_err != NULL) {
- error_propagate(errp, local_err);
- ret = -EINVAL;
- goto fail;
- }
if (update_header) {
ret = qcow2_update_header(bs);
--
2.20.1
- [PULL 06/30] block: Error out on image creation with conflicting size options, (continued)
- [PULL 06/30] block: Error out on image creation with conflicting size options, Kevin Wolf, 2019/12/19
- [PULL 05/30] qemu-img: fix info --backing-chain --image-opts, Kevin Wolf, 2019/12/19
- [PULL 08/30] qcow2: Declare BDRV_REQ_NO_FALLBACK supported, Kevin Wolf, 2019/12/19
- [PULL 07/30] blockjob: Fix error message for negative speed, Kevin Wolf, 2019/12/19
- [PULL 09/30] iotests: Add qemu_io_log(), Kevin Wolf, 2019/12/19
- [PULL 10/30] iotests: Fix timeout in run_job(), Kevin Wolf, 2019/12/19
- [PULL 11/30] iotests: Support job-complete in run_job(), Kevin Wolf, 2019/12/19
- [PULL 12/30] qcow2: Use offset_into_cluster(), Kevin Wolf, 2019/12/19
- [PULL 14/30] iotests: Add more "_require_drivers" checks to the shell-based tests, Kevin Wolf, 2019/12/19
- [PULL 13/30] MAINTAINERS: fix qcow2-bitmap.c under Dirty Bitmaps header, Kevin Wolf, 2019/12/19
- [PULL 17/30] qcow2: Move error check of local_err near its assignment,
Kevin Wolf <=
- [PULL 15/30] iotests/273: Filter format-specific information, Kevin Wolf, 2019/12/19
- [PULL 16/30] iotests: Fix IMGOPTSSYNTAX for nbd, Kevin Wolf, 2019/12/19
- [PULL 18/30] iotests: Create VM.blockdev_create(), Kevin Wolf, 2019/12/19
- [PULL 19/30] iotests: 255: Drop blockdev_create(), Kevin Wolf, 2019/12/19
- [PULL 20/30] iotests: 206: Convert to VM.blockdev_create(), Kevin Wolf, 2019/12/19
- [PULL 21/30] iotests: 210: Convert to VM.blockdev_create(), Kevin Wolf, 2019/12/19
- [PULL 22/30] iotests: 212: Convert to VM.blockdev_create(), Kevin Wolf, 2019/12/19
- [PULL 23/30] iotests: 213: Convert to VM.blockdev_create(), Kevin Wolf, 2019/12/19
- [PULL 28/30] block: Activate recursively even for already active nodes, Kevin Wolf, 2019/12/19
- [PULL 30/30] iotests: Test external snapshot with VM state, Kevin Wolf, 2019/12/19