From: Stefan Hajnoczi <stefanha@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
qemu-devel@nongnu.org, "Benoît Canet" <benoit@irqsave.net>
Subject: Re: [Qemu-devel] [PATCH] block: Unlink temporary file
Date: Mon, 17 Feb 2014 11:12:44 +0100 [thread overview]
Message-ID: <20140217101244.GA28909@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1392483801-15830-1-git-send-email-mreitz@redhat.com>
On Sat, Feb 15, 2014 at 06:03:21PM +0100, Max Reitz wrote:
> If the image file cannot be opened and was created as a temporary file,
> it should be deleted; thus, in this case, we should jump to the
> "unlink_and_fail" label and not just to "fail".
>
> Reported-by: Benoît Canet <benoit@irqsave.net>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> This patch's context depends on my bdrv_open()/bdrv_file_open() series
> ("[PATCH v3 0/8] block: Integrate bdrv_file_open() into bdrv_open()").
> ---
> block.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block.c b/block.c
> index 62161bd..51c77b0 100644
> --- a/block.c
> +++ b/block.c
> @@ -1308,7 +1308,7 @@ int bdrv_open(BlockDriverState **pbs, const char *filename,
> bdrv_open_flags(bs, flags | BDRV_O_UNMAP) |
> BDRV_O_PROTOCOL, true, &local_err);
> if (ret < 0) {
> - goto fail;
> + goto unlink_and_fail;
> }
>
> /* Find the right image format driver */
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
next prev parent reply other threads:[~2014-02-17 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-15 17:03 [Qemu-devel] [PATCH] block: Unlink temporary file Max Reitz
2014-02-17 10:12 ` Stefan Hajnoczi [this message]
2014-03-12 9:15 ` Stefan Hajnoczi
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=20140217101244.GA28909@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=benoit@irqsave.net \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).