qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 05/14] block: drop extra error propagation for bdrv_set_backi


From: Greg Kurz
Subject: Re: [PATCH 05/14] block: drop extra error propagation for bdrv_set_backing_hd
Date: Thu, 10 Sep 2020 18:30:35 +0200

On Wed,  9 Sep 2020 21:59:21 +0300
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> wrote:

> 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>

>  block.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/block.c b/block.c
> index 9b624b2535..c5e3a1927e 100644
> --- a/block.c
> +++ b/block.c
> @@ -3011,11 +3011,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;
>      }
>  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]