On 21.02.2017 15:58, Kevin Wolf wrote:
> This fixes the use of a parent-less BdrvChild in bdrv_open_inherit() by
> converting it into a BlockBackend. Which is exactly what it should be,
> image probing is an external, standalone user of a node. The requests
> can't be considered to originate from the format driver node because
> that one isn't even opened yet.
> 
> Signed-off-by: Kevin Wolf <kw...@redhat.com>
> ---
>  block.c | 34 +++++++++++++++++++---------------
>  1 file changed, 19 insertions(+), 15 deletions(-)
> 
> diff --git a/block.c b/block.c
> index e9d90aa..0f17576 100644
> --- a/block.c
> +++ b/block.c

[...]

> @@ -1922,7 +1926,7 @@ static BlockDriverState *bdrv_open_inherit(const char 
> *filename,
>  
>  fail:
>      if (file != NULL) {
> -        bdrv_unref_child(bs, file);
> +        blk_unref(file);
>      }

You could drop the now superfluous condition around it, but anyway:

Reviewed-by: Max Reitz <mre...@redhat.com>

(Also, you could revert the change to bdrv_unref_child() done in patch 5.)

Max

>      if (bs->file != NULL) {
>          bdrv_unref_child(bs, bs->file);
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to