[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/34] block/io: bdrv_refresh_limits(): use ERRP_GUARD
From: |
Kevin Wolf |
Subject: |
[PULL 29/34] block/io: bdrv_refresh_limits(): use ERRP_GUARD |
Date: |
Fri, 11 Dec 2020 18:08:07 +0100 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
This simplifies following commit.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20201203222713.13507-3-vsementsov@virtuozzo.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/io.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/block/io.c b/block/io.c
index ec5e152bb7..3e91074c9f 100644
--- a/block/io.c
+++ b/block/io.c
@@ -135,10 +135,10 @@ static void bdrv_merge_limits(BlockLimits *dst, const
BlockLimits *src)
void bdrv_refresh_limits(BlockDriverState *bs, Error **errp)
{
+ ERRP_GUARD();
BlockDriver *drv = bs->drv;
BdrvChild *c;
bool have_limits;
- Error *local_err = NULL;
memset(&bs->bl, 0, sizeof(bs->bl));
@@ -156,9 +156,8 @@ void bdrv_refresh_limits(BlockDriverState *bs, Error **errp)
QLIST_FOREACH(c, &bs->children, next) {
if (c->role & (BDRV_CHILD_DATA | BDRV_CHILD_FILTERED | BDRV_CHILD_COW))
{
- bdrv_refresh_limits(c->bs, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
+ bdrv_refresh_limits(c->bs, errp);
+ if (*errp) {
return;
}
bdrv_merge_limits(&bs->bl, &c->bs->bl);
--
2.29.2
- [PULL 16/34] iotests/091: Use _cleanup_qemu instad of "wait", (continued)
- [PULL 16/34] iotests/091: Use _cleanup_qemu instad of "wait", Kevin Wolf, 2020/12/11
- [PULL 26/34] iotests/221: Discard image before qemu-img map, Kevin Wolf, 2020/12/11
- [PULL 24/34] iotests/308: Add test for FUSE exports, Kevin Wolf, 2020/12/11
- [PULL 19/34] iotests/287: Clean up subshell test image, Kevin Wolf, 2020/12/11
- [PULL 25/34] file-posix: check the use_lock before setting the file lock, Kevin Wolf, 2020/12/11
- [PULL 27/34] can-host: Fix crash when 'canbus' property is not set, Kevin Wolf, 2020/12/11
- [PULL 22/34] iotests: Allow testing FUSE exports, Kevin Wolf, 2020/12/11
- [PULL 21/34] iotests: Give access to the qemu-storage-daemon, Kevin Wolf, 2020/12/11
- [PULL 23/34] iotests: Enable fuse for many tests, Kevin Wolf, 2020/12/11
- [PULL 28/34] block/file-posix: fix workaround in raw_do_pwrite_zeroes(), Kevin Wolf, 2020/12/11
- [PULL 29/34] block/io: bdrv_refresh_limits(): use ERRP_GUARD,
Kevin Wolf <=
- [PULL 31/34] block: introduce BDRV_MAX_LENGTH, Kevin Wolf, 2020/12/11
- [PULL 34/34] block: Fix deadlock in bdrv_co_yield_to_drain(), Kevin Wolf, 2020/12/11
- [PULL 32/34] block: Simplify qmp_block_resize() error paths, Kevin Wolf, 2020/12/11
- [PULL 33/34] block: Fix locking in qmp_block_resize(), Kevin Wolf, 2020/12/11
- [PULL 30/34] block/io: bdrv_check_byte_request(): drop bdrv_is_inserted(), Kevin Wolf, 2020/12/11
- Re: [PULL 00/34] Block layer patches, Peter Maydell, 2020/12/12