[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/17] block: drop extra error propagation for bdrv_set_backing_hd
From: |
Eric Blake |
Subject: |
[PULL 08/17] block: drop extra error propagation for bdrv_set_backing_hd |
Date: |
Tue, 9 Mar 2021 09:51:53 -0600 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
bdrv_set_backing_hd now returns status, let's use it.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-Id: <20210202124956.63146-6-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
---
block.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/block.c b/block.c
index a1f3cecd7552..933ff49b10ff 100644
--- a/block.c
+++ b/block.c
@@ -2995,11 +2995,9 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict
*parent_options,
/* Hook up the backing file link; drop our reference, bs owns the
* backing_hd reference now */
- bdrv_set_backing_hd(bs, backing_hd, &local_err);
+ ret = bdrv_set_backing_hd(bs, backing_hd, errp);
bdrv_unref(backing_hd);
- if (local_err) {
- error_propagate(errp, local_err);
- ret = -EINVAL;
+ if (ret < 0) {
goto free_exit;
}
--
2.30.1
- [PULL 01/17] MAINTAINERS: add Vladimir as co-maintainer of NBD, (continued)
- [PULL 01/17] MAINTAINERS: add Vladimir as co-maintainer of NBD, Eric Blake, 2021/03/09
- [PULL 07/17] blockdev: fix drive_backup_prepare() missed error, Eric Blake, 2021/03/09
- [PULL 06/17] block: check return value of bdrv_open_child and drop error propagation, Eric Blake, 2021/03/09
- [PULL 05/17] utils: Deprecate hex-with-suffix sizes, Eric Blake, 2021/03/09
- [PULL 12/17] block/qcow2-bitmap: improve qcow2_load_dirty_bitmaps() interface, Eric Blake, 2021/03/09
- [PULL 11/17] block/qcow2: qcow2_get_specific_info(): drop error propagation, Eric Blake, 2021/03/09
- [PULL 13/17] block/qcow2-bitmap: return status from qcow2_store_persistent_dirty_bitmaps, Eric Blake, 2021/03/09
- [PULL 10/17] blockjob: return status from block_job_set_speed(), Eric Blake, 2021/03/09
- [PULL 16/17] block/qed: bdrv_qed_do_open: deal with errp, Eric Blake, 2021/03/09
- [PULL 17/17] block/qcow2: refactor qcow2_update_options_prepare error paths, Eric Blake, 2021/03/09
- [PULL 08/17] block: drop extra error propagation for bdrv_set_backing_hd,
Eric Blake <=
- [PULL 14/17] block/qcow2: read_cache_sizes: return status value, Eric Blake, 2021/03/09
- [PULL 09/17] block/mirror: drop extra error propagation in commit_active_start(), Eric Blake, 2021/03/09
- [PULL 15/17] block/qcow2: simplify qcow2_co_invalidate_cache(), Eric Blake, 2021/03/09
- Re: [PULL 00/17] NBD patches through 2021-03-09, Peter Maydell, 2021/03/11
- Re: [PULL 00/17] NBD patches through 2021-03-09, Peter Maydell, 2021/03/11