From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDxJv-0001FQ-BK for qemu-devel@nongnu.org; Thu, 13 Feb 2014 09:31:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDxJp-00064K-Cc for qemu-devel@nongnu.org; Thu, 13 Feb 2014 09:31:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:24703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDxJp-000648-5A for qemu-devel@nongnu.org; Thu, 13 Feb 2014 09:31:13 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1DEVCMf005308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 13 Feb 2014 09:31:12 -0500 Date: Thu, 13 Feb 2014 15:31:01 +0100 From: Kevin Wolf Message-ID: <20140213143101.GG32343@dhcp-200-207.str.redhat.com> References: <20aba630c8a70a11c19404ca7020f3bd6c42f21e.1392301375.git.jcody@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20aba630c8a70a11c19404ca7020f3bd6c42f21e.1392301375.git.jcody@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] block: mirror - use local_err to avoid NULL errp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, armbru@redhat.com Am 13.02.2014 um 15:23 hat Jeff Cody geschrieben: > 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 > Signed-off-by: Jeff Cody Reviewed-by: Kevin Wolf