vfs: Implement proper O_SYNC semantics