qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH v7 02/24] blockjob: Call bdrv_unref


From: Fam Zheng
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v7 02/24] blockjob: Call bdrv_unref() on creation error
Date: Thu, 12 Nov 2015 14:16:02 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, 11/09 23:39, Max Reitz wrote:
> If block_job_create() fails, it should release its reference to the
> job's BDS. Normally, this is done in the callback provided by the
> caller, but that callback will not be invoked if the block job failed to
> be created.
> 
> Signed-off-by: Max Reitz <address@hidden>
> Reviewed-by: Alberto Garcia <address@hidden>
> Reviewed-by: Kevin Wolf <address@hidden>
> ---
>  blockjob.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/blockjob.c b/blockjob.c
> index c02fe59..0886a4a 100644
> --- a/blockjob.c
> +++ b/blockjob.c
> @@ -70,6 +70,7 @@ void *block_job_create(const BlockJobDriver *driver, 
> BlockDriverState *bs,
>          if (local_err) {
>              block_job_release(bs);
>              error_propagate(errp, local_err);
> +            bdrv_unref(bs);
>              return NULL;
>          }
>      }
> -- 
> 2.6.2
> 
> 

Reviewed-by: Fam Zheng <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]