The Samba-Bugzilla – Bug 4455
fsync called after closing file
Last modified: 2008-07-26 10:06:58 UTC
You broke my patch I submitted in 2003(?).
Now in copy_file() with fsync.diff, rsync first does
close(ofd) and then fsync(ofd).
fsync should be done first.
The other (more common) fsync call in receive_data() is OK.
In case fsync(ofd) fails, close(ofd) is not called.
It should do (void)close(ofd) just before "return -1".
Thanks. I've checked in these changes.