summary refs log tree commit diff
path: root/misc
diff options
context:
space:
mode:
authorRichard Nyberg <rnyberg@murmeldjur.se>2006-10-15 09:27:21 +0000
committerRichard Nyberg <rnyberg@murmeldjur.se>2006-10-15 09:27:21 +0000
commitf20c481b11b6dc1d1f13027f6b13be0e42ce08ad (patch)
treee6aa1dbed78278464f432b4f7c1aec0e240e1495 /misc
parent110b1d7e2241fbc2f013f8059c3b83756ca5bc6c (diff)
downloadbtpd-f20c481b11b6dc1d1f13027f6b13be0e42ce08ad.tar.gz
btpd-f20c481b11b6dc1d1f13027f6b13be0e42ce08ad.zip
There's no need to fsync here, so remove the call. This should improve
write performance.

Diffstat (limited to 'misc')
-rw-r--r--misc/stream.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/misc/stream.c b/misc/stream.c
index 32a2512..4c51d96 100644
--- a/misc/stream.c
+++ b/misc/stream.c
@@ -146,11 +146,6 @@ bts_put(struct bt_stream *bts, off_t off, const uint8_t *buf, size_t len)
         bts->f_off += didwrite;
         bts->t_off += didwrite;
         if (bts->f_off == bts->files[bts->index].length) {
-            if (fsync(bts->fd) == -1) {
-                int err = errno;
-                close(bts->fd);
-                return err;
-            }
             if (close(bts->fd) == -1)
                 return errno;
             bts->fd = -1;