From patchwork Sun Sep 23 14:49:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Orit Wasserman X-Patchwork-Id: 186239 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 BA0CD2C0090 for ; Mon, 24 Sep 2012 00:50:17 +1000 (EST) Received: from localhost ([::1]:38681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFnVf-0008Mf-TX for incoming@patchwork.ozlabs.org; Sun, 23 Sep 2012 10:50:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFnUu-0006My-Pg for qemu-devel@nongnu.org; Sun, 23 Sep 2012 10:49:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFnUt-0002xr-Nw for qemu-devel@nongnu.org; Sun, 23 Sep 2012 10:49:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFnUt-0002xm-Fn for qemu-devel@nongnu.org; Sun, 23 Sep 2012 10:49:27 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8NEnPiA025516 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 23 Sep 2012 10:49:25 -0400 Received: from dhcp-1-120.tlv.redhat.com (vpn-203-98.tlv.redhat.com [10.35.203.98]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8NEn50S006725; Sun, 23 Sep 2012 10:49:22 -0400 From: Orit Wasserman To: qemu-devel@nongnu.org Date: Sun, 23 Sep 2012 16:49:07 +0200 Message-Id: <1348411747-29804-5-git-send-email-owasserm@redhat.com> In-Reply-To: <1348411747-29804-1-git-send-email-owasserm@redhat.com> References: <1348411747-29804-1-git-send-email-owasserm@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, aliguori@us.ibm.com, quintela@redhat.com, armbru@redhat.com, mst@redhat.com, mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com, Orit Wasserman , pbonzini@redhat.com, akong@redhat.com Subject: [Qemu-devel] [PATCH v4 4/4] Clear handler only for valid fd 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: Orit Wasserman --- migration.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index 1edeec5..c20a2fe 100644 --- a/migration.c +++ b/migration.c @@ -240,8 +240,6 @@ static int migrate_fd_cleanup(MigrationState *s) { int ret = 0; - qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); - if (s->file) { DPRINTF("closing file\n"); ret = qemu_fclose(s->file); @@ -249,6 +247,7 @@ static int migrate_fd_cleanup(MigrationState *s) } if (s->fd != -1) { + qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); close(s->fd); s->fd = -1; }