title: Do I need to fsync before deleting file?
body: <p>The question is related with implementing file copy in linux:
  1. Create a new file
  2. Copying data to this file
  3. If user want to stop before copying finished, this new file should be deleted</p>
  
  <p>Do I need to call fsync before closing this file and then unlink it?
  Because closing file will not do fsync, does unlink will not delete the file until all dirty data of this file finished written back to disc?
  I want to make sure the file is really unlinked at the time unlink() command returned.</p>