From patchwork Tue Oct 11 10:00:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 118965 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 467C1B6F6F for ; Tue, 11 Oct 2011 22:57:24 +1100 (EST) Received: from localhost ([::1]:43151 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDZAk-0002OB-OZ for incoming@patchwork.ozlabs.org; Tue, 11 Oct 2011 06:02:54 -0400 Received: from eggs.gnu.org ([140.186.70.92]:35405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDZAX-00029F-IT for qemu-devel@nongnu.org; Tue, 11 Oct 2011 06:02:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDZAO-0008DQ-8E for qemu-devel@nongnu.org; Tue, 11 Oct 2011 06:02:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDZAN-0008DA-U5 for qemu-devel@nongnu.org; Tue, 11 Oct 2011 06:02:32 -0400 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 p9BA2VlM017823 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Oct 2011 06:02:31 -0400 Received: from neno.neno (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p9BA1lvo021320; Tue, 11 Oct 2011 06:02:26 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 11 Oct 2011 12:00:27 +0200 Message-Id: <59b76df2ff78727551dfa45b02af2ca5e442d84b.1318326683.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 07/36] buffered_file: Use right "opaque" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org buffered_close 's' variable is of type QEMUFileBuffered, and wait_for_unfreeze() expect to receive a MigrationState, that 'coincidentaly' is s->opaque. Signed-off-by: Juan Quintela Reviewed-by: Anthony Liguori --- buffered_file.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index bcdf04f..701b440 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -176,7 +176,7 @@ static int buffered_close(void *opaque) while (!s->has_error && s->buffer_size) { buffered_flush(s); if (s->freeze_output) - s->wait_for_unfreeze(s); + s->wait_for_unfreeze(s->opaque); } ret = s->close(s->opaque);