diff options
Diffstat (limited to 'block/io.c')
-rw-r--r-- | block/io.c | 7 |
1 files 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); |