From d8a27193f158d22a6b8ce0512c62191226e8d969 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Fri, 28 Oct 2011 14:22:39 -0200
Subject: [RHEL6 qemu-kvm PATCH 13/17] Revert "migration: add error handling to migrate_fd_put_notify()."

RH-Reverts: 1eb443c2dcf2efd4f82a79bcdf6f1c341d0fa9e5
RH-Reverts-patchwork-id: 34431
Bugzilla-related: 669581
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 migration.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/migration.c b/migration.c
index ff60b3b..ee517a8 100644
--- a/migration.c
+++ b/migration.c
@@ -330,9 +330,6 @@ void migrate_fd_put_notify(void *opaque)
 
     qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
     qemu_file_put_notify(s->file);
-    if (qemu_file_has_error(s->file)) {
-        migrate_fd_error(s);
-    }
 }
 
 ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size)
@@ -349,6 +346,9 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size)
 
     if (ret == -EAGAIN) {
         qemu_set_fd_handler2(s->fd, NULL, NULL, migrate_fd_put_notify, s);
+    } else if (ret < 0) {
+        s->state = MIG_STATE_ERROR;
+        notifier_list_notify(&migration_state_notifiers);
     }
 
     return ret;
-- 
1.7.3.2

