* [Qemu-devel] [PATCH] block: Fix bdrv_all_delete_snapshot() error handling
@ 2016-06-06 10:56 Kevin Wolf
2016-06-06 11:12 ` [Qemu-devel] [Qemu-block] " Max Reitz
2016-06-07 13:49 ` Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Kevin Wolf @ 2016-06-06 10:56 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, pbonzini, qemu-devel
The code to exit the loop after bdrv_snapshot_delete_by_id_or_name()
returned failure was duplicated. The first copy of it was too early so
that the AioContext lock would not be freed. This patch removes it so
that only the second, correct copy remains.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/snapshot.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/block/snapshot.c b/block/snapshot.c
index 6e6e34f..da89d2b 100644
--- a/block/snapshot.c
+++ b/block/snapshot.c
@@ -409,9 +409,6 @@ int bdrv_all_delete_snapshot(const char *name, BlockDriverState **first_bad_bs,
if (bdrv_can_snapshot(bs) &&
bdrv_snapshot_find(bs, snapshot, name) >= 0) {
ret = bdrv_snapshot_delete_by_id_or_name(bs, name, err);
- if (ret < 0) {
- goto fail;
- }
}
aio_context_release(ctx);
if (ret < 0) {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH] block: Fix bdrv_all_delete_snapshot() error handling
2016-06-06 10:56 [Qemu-devel] [PATCH] block: Fix bdrv_all_delete_snapshot() error handling Kevin Wolf
@ 2016-06-06 11:12 ` Max Reitz
2016-06-07 13:49 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Max Reitz @ 2016-06-06 11:12 UTC (permalink / raw)
To: Kevin Wolf, qemu-block; +Cc: pbonzini, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 477 bytes --]
On 06.06.2016 12:56, Kevin Wolf wrote:
> The code to exit the loop after bdrv_snapshot_delete_by_id_or_name()
> returned failure was duplicated. The first copy of it was too early so
> that the AioContext lock would not be freed. This patch removes it so
> that only the second, correct copy remains.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block/snapshot.c | 3 ---
> 1 file changed, 3 deletions(-)
Reviewed-by: Max Reitz <mreitz@redhat.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH] block: Fix bdrv_all_delete_snapshot() error handling
2016-06-06 10:56 [Qemu-devel] [PATCH] block: Fix bdrv_all_delete_snapshot() error handling Kevin Wolf
2016-06-06 11:12 ` [Qemu-devel] [Qemu-block] " Max Reitz
@ 2016-06-07 13:49 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2016-06-07 13:49 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-block, pbonzini, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 504 bytes --]
On Mon, Jun 06, 2016 at 12:56:44PM +0200, Kevin Wolf wrote:
> The code to exit the loop after bdrv_snapshot_delete_by_id_or_name()
> returned failure was duplicated. The first copy of it was too early so
> that the AioContext lock would not be freed. This patch removes it so
> that only the second, correct copy remains.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block/snapshot.c | 3 ---
> 1 file changed, 3 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-07 13:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-06 10:56 [Qemu-devel] [PATCH] block: Fix bdrv_all_delete_snapshot() error handling Kevin Wolf
2016-06-06 11:12 ` [Qemu-devel] [Qemu-block] " Max Reitz
2016-06-07 13:49 ` Stefan Hajnoczi
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).