[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] block: mirror - use local_err to avoid NULL
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2] block: mirror - use local_err to avoid NULL errp |
Date: |
Fri, 14 Feb 2014 16:28:21 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Feb 13, 2014 at 09:23:38AM -0500, Jeff Cody wrote:
> When starting a block job, commit_active_start() relies on whether *errp
> is set by mirror_start_job. This allows it to determine if the mirror
> job start failed, so that it can clean up any changes to open flags from
> the bdrv_reopen(). If errp is NULL, then it will not be able to
> determine if mirror_start_job failed or not.
>
> To avoid this, use a local Error variable, and then propagate the error
> (if any) to errp.
>
> Reported-by: Markus Armbruster <address@hidden>
> Signed-off-by: Jeff Cody <address@hidden>
> ---
> block/mirror.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan