[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] block/backup-top: fix failure path
From: |
Max Reitz |
Subject: |
Re: [PATCH 1/2] block/backup-top: fix failure path |
Date: |
Mon, 20 Jan 2020 17:50:38 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 |
On 16.01.20 16:54, Vladimir Sementsov-Ogievskiy wrote:
> We can't access top after call bdrv_backup_top_drop, as it is already
> freed at this time.
>
> Also, no needs to unref target child by hand, it will be unrefed on
> bdrv_close() automatically.
>
> So, just do bdrv_backup_top_drop if append succeed and one bdrv_unref
> otherwise.
>
> Note, that in !appended case bdrv_unref(top) moved into drained section
> on source. It doesn't really matter, but just for code simplicity.
>
> Fixes: 7df7868b96404
> Cc: address@hidden # v4.2.0
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> block/backup-top.c | 21 ++++++++++++---------
> 1 file changed, 12 insertions(+), 9 deletions(-)
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation, (continued)
- Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation, Max Reitz, 2020/01/21
- Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation, Vladimir Sementsov-Ogievskiy, 2020/01/21
- Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation, Max Reitz, 2020/01/21
- Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation, Vladimir Sementsov-Ogievskiy, 2020/01/21
- Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation, Max Reitz, 2020/01/21
- Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation, Vladimir Sementsov-Ogievskiy, 2020/01/21
- Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation, Max Reitz, 2020/01/21
- Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation, Vladimir Sementsov-Ogievskiy, 2020/01/21
- Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation, Max Reitz, 2020/01/21
[PATCH 1/2] block/backup-top: fix failure path, Vladimir Sementsov-Ogievskiy, 2020/01/16
- Re: [PATCH 1/2] block/backup-top: fix failure path,
Max Reitz <=