From patchwork Fri Feb 15 17:47:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 220813 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 558B92C0082 for ; Sat, 16 Feb 2013 05:57:29 +1100 (EST) Received: from localhost ([::1]:55924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6PPb-00089T-1t for incoming@patchwork.ozlabs.org; Fri, 15 Feb 2013 12:49:27 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6PPA-0007W6-Ew for qemu-devel@nongnu.org; Fri, 15 Feb 2013 12:49:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6PP5-0004Yh-8L for qemu-devel@nongnu.org; Fri, 15 Feb 2013 12:49:00 -0500 Received: from mail-vc0-f177.google.com ([209.85.220.177]:63209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6PP5-0004YV-4U for qemu-devel@nongnu.org; Fri, 15 Feb 2013 12:48:55 -0500 Received: by mail-vc0-f177.google.com with SMTP id m18so2328629vcm.36 for ; Fri, 15 Feb 2013 09:48:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=IwJFHBZa6y23VkJ1YvRgXkQrypKEWQZF7ugGcEWfsNk=; b=gHE7RdMrwHR+/Bp8OcVAFLdCsMMKNr4ihzFwlI0Gm7qFAbdI91oqKZlnpQrWghn9+N IBWesO4aZXsbKCr9G+aXSq5nC3iV/96QjzE7UvoLy7DTtbbxz70KzxVXRidDdDxTZJ5p cwlh2hqdOOnUiHC2uOJ8fO+iMB2bDQFbzwC6szim4B6XhzSJlCg5Bs1s6Q+kYuFxcI48 +MV1OfpymZR8iryIPzUKUV0+GYLo/NBXbeNBr3BLqnrx/oEbn+OSzBt45uz8Vadxs+rm jJ7PzbzoWBV38fRtUokaVv7pJI1/VGNM25RxJIqS7ko/umq1AXFWwMZP9zSLmyX+A8bj AuQQ== X-Received: by 10.52.65.73 with SMTP id v9mr3874476vds.30.1360950534628; Fri, 15 Feb 2013 09:48:54 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-179-137.ip50.fastwebnet.it. [93.34.179.137]) by mx.google.com with ESMTPS id yu12sm65402142vec.6.2013.02.15.09.48.52 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 15 Feb 2013 09:48:53 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 15 Feb 2013 18:47:13 +0100 Message-Id: <1360950433-17106-42-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1360950433-17106-1-git-send-email-pbonzini@redhat.com> References: <1360950433-17106-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.220.177 Cc: owasserm@redhat.com, chegu_vinod@hp.com, quintela@redhat.com Subject: [Qemu-devel] [PATCH 41/41] migration: inline migrate_fd_close 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 Signed-off-by: Paolo Bonzini Reviewed-by: Juan Quintela Reviewed-by: Orit Wasserman --- migration.c | 14 ++------------ 1 files changed, 2 insertions(+), 12 deletions(-) diff --git a/migration.c b/migration.c index b32dfc1..8fb2d2e 100644 --- a/migration.c +++ b/migration.c @@ -273,10 +273,10 @@ static void migrate_fd_cleanup(void *opaque) qemu_thread_join(&s->thread); qemu_mutex_lock_iothread(); - migrate_fd_close(s); + qemu_fclose(s->file); + s->file = NULL; } - assert(s->file == NULL); assert(s->state != MIG_STATE_ACTIVE); if (s->state != MIG_STATE_COMPLETED) { @@ -301,16 +301,6 @@ static void migrate_fd_cancel(MigrationState *s) __sync_val_compare_and_swap(&s->state, MIG_STATE_ACTIVE, MIG_STATE_CANCELLED); } -int migrate_fd_close(MigrationState *s) -{ - int rc = 0; - if (s->file != NULL) { - rc = qemu_fclose(s->file); - s->file = NULL; - } - return rc; -} - void add_migration_state_change_notifier(Notifier *notify) { notifier_list_add(&migration_state_notifiers, notify);