diff mbox

[11/18] buffered_file: don't flush on put buffer

Message ID 1351519903-26607-12-git-send-email-quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela Oct. 29, 2012, 2:11 p.m. UTC
We call buffered_put_buffer with iothread held, and buffered_flush() does
synchronous writes.  We only want to do the synchronous writes outside.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 buffered_file.c | 6 ------
 1 file changed, 6 deletions(-)
diff mbox

Patch

diff --git a/buffered_file.c b/buffered_file.c
index 018cab7..2bdda27 100644
--- a/buffered_file.c
+++ b/buffered_file.c
@@ -107,12 +107,6 @@  static int buffered_put_buffer(void *opaque, const uint8_t *buf, int64_t pos, in
         buffered_append(s, buf, size);
     }

-    error = buffered_flush(s);
-    if (error < 0) {
-        DPRINTF("buffered flush error. bailing: %s\n", strerror(-error));
-        return error;
-    }
-
     return size;
 }