From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XON3t-0004hj-V4 for qemu-devel@nongnu.org; Mon, 01 Sep 2014 04:34:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XON3m-0001yi-Rc for qemu-devel@nongnu.org; Mon, 01 Sep 2014 04:34:05 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:36396 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XON3m-0001ye-JK for qemu-devel@nongnu.org; Mon, 01 Sep 2014 04:33:58 -0400 Date: Mon, 1 Sep 2014 10:33:11 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140901083311.GE15537@irqsave.net> References: <1409557394-11853-1-git-send-email-namei.unix@gmail.com> <1409557394-11853-5-git-send-email-namei.unix@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1409557394-11853-5-git-send-email-namei.unix@gmail.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 4/8] block/quorum: add quorum_aio_release() helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Yuan Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi The Monday 01 Sep 2014 =E0 15:43:10 (+0800), Liu Yuan wrote : > Cc: Eric Blake > Cc: Benoit Canet > Cc: Kevin Wolf > Cc: Stefan Hajnoczi > Signed-off-by: Liu Yuan > --- > block/quorum.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) >=20 > diff --git a/block/quorum.c b/block/quorum.c > index 5866bca..9e056d6 100644 > --- a/block/quorum.c > +++ b/block/quorum.c > @@ -130,6 +130,12 @@ struct QuorumAIOCB { > =20 > static bool quorum_vote(QuorumAIOCB *acb); > =20 > +static void quorum_aio_release(QuorumAIOCB *acb) > +{ > + g_free(acb->qcrs); > + qemu_aio_release(acb); > +} > + > static void quorum_aio_cancel(BlockDriverAIOCB *blockacb) > { > QuorumAIOCB *acb =3D container_of(blockacb, QuorumAIOCB, common); > @@ -141,8 +147,7 @@ static void quorum_aio_cancel(BlockDriverAIOCB *blo= ckacb) > bdrv_aio_cancel(acb->qcrs[i].aiocb); > } > =20 > - g_free(acb->qcrs); > - qemu_aio_release(acb); > + quorum_aio_release(acb); > } > =20 > static AIOCBInfo quorum_aiocb_info =3D { > @@ -168,8 +173,7 @@ static void quorum_aio_finalize(QuorumAIOCB *acb) > } > } > =20 > - g_free(acb->qcrs); > - qemu_aio_release(acb); > + quorum_aio_release(acb); > } > =20 > static bool quorum_sha256_compare(QuorumVoteValue *a, QuorumVoteValue = *b) > --=20 > 1.9.1 >=20 Reviewed-by: Beno=EEt Canet