Moved one fsync() call.
authorWayne Davison <wayned@samba.org>
Mon, 19 Mar 2007 20:44:52 +0000 (20:44 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 19 Mar 2007 20:44:52 +0000 (20:44 +0000)
fsync.diff

index 7af19ea..276c454 100644 (file)
@@ -86,8 +86,8 @@ To use this patch, run these commands for a successful build:
  extern int modify_window;
  extern int relative_paths;
  extern int human_readable;
-@@ -315,6 +316,12 @@ int copy_file(const char *source, const 
-               return -1;
+@@ -309,6 +310,12 @@ int copy_file(const char *source, const 
+                       full_fname(source));
        }
  
 +      if (do_fsync && fsync(ofd) < 0) {
@@ -96,6 +96,6 @@ To use this patch, run these commands for a successful build:
 +              return -1;
 +      }
 +
-       return 0;
- }
+       if (close(ofd) < 0) {
+               rsyserr(FERROR, errno, "close failed on %s",
+                       full_fname(dest));