qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Tuguoyi <tu.guoyi@h3c.com>, Kevin Wolf <kwolf@redhat.com>,
	Max Reitz <mreitz@redhat.com>,
	"qemu-block@nongnu.org" <qemu-block@nongnu.org>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH] qcow2: Move error check of local_err near its assignment
Date: Wed, 18 Dec 2019 09:47:44 +0000	[thread overview]
Message-ID: <016172ff-08e5-056a-09d8-cd48cb0c3172@virtuozzo.com> (raw)
In-Reply-To: <c9d3fc7246ec4c1f9a6cde9ed3c3ae57@h3c.com>

18.12.2019 5:26, Tuguoyi wrote:
> 
> Signed-off-by: Guoyi Tu <tu.guoyi@h3c.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

> ---
>   block/qcow2.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/block/qcow2.c b/block/qcow2.c
> index 7c18721..ce3db29 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);
> 


-- 
Best regards,
Vladimir

      parent reply	other threads:[~2019-12-18  9:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18  2:26 [PATCH] qcow2: Move error check of local_err near its assignment Tuguoyi
2019-12-18  9:32 ` Kevin Wolf
2019-12-18 11:44   ` Tuguoyi
2019-12-18  9:47 ` Vladimir Sementsov-Ogievskiy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=016172ff-08e5-056a-09d8-cd48cb0c3172@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=tu.guoyi@h3c.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).