Make sure we check the return of flush_write_file() in the write_file()
authorWayne Davison <wayned@samba.org>
Tue, 16 Dec 2003 19:58:01 +0000 (19:58 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 16 Dec 2003 19:58:01 +0000 (19:58 +0000)
loop.  This needs to be improved a bit more, but this patch is as good
as the old in this area, so we'll revisit this issue later.

craigb-perf.diff

index 358660e..a0a3e55 100644 (file)
@@ -151,7 +151,7 @@ Note: This is an updated patch for 2.6.0, created by Wayne Davison.
 +                              wf_writeBufCnt += r1;
 +                      }
 +                      if (wf_writeBufCnt == wf_writeBufSize) {
-+                              flush_write_file(f);
++                              if (flush_write_file(f) < 0) return -1;
 +                              if (!r1 && len)
 +                                      continue;
 +                      }