Commit a23e51a3 authored by rmcilroy@chromium.org's avatar rmcilroy@chromium.org

Revert "Do fcntl(...F_FULLFSYNC...) on mac instead of fsync"

This reverts commit r221413.

Original CL: https://src.chromium.org/viewvc/chrome?revision=221413&view=revision

BUG=286266
NOTRY=true
TBR=dgrogan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23538008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221702 0039d316-1c4b-4281-b951-d872f2087c98
parent ce046700
...@@ -68,8 +68,6 @@ int fflush_wrapper(FILE *file) { ...@@ -68,8 +68,6 @@ int fflush_wrapper(FILE *file) {
int fdatasync(int fildes) { int fdatasync(int fildes) {
#if defined(OS_WIN) #if defined(OS_WIN)
return _commit(fildes); return _commit(fildes);
#elif defined(OS_MACOSX)
return HANDLE_EINTR(fcntl(fildes, F_FULLFSYNC, 0));
#else #else
return HANDLE_EINTR(fsync(fildes)); return HANDLE_EINTR(fsync(fildes));
#endif #endif
...@@ -517,7 +515,7 @@ Status ChromiumWritableFile::Sync() { ...@@ -517,7 +515,7 @@ Status ChromiumWritableFile::Sync() {
error = errno; error = errno;
// Sync even if fflush gave an error; perhaps the data actually got out, // Sync even if fflush gave an error; perhaps the data actually got out,
// even though something went wrong. // even though something went wrong.
if (fdatasync(fileno(file_)) == -1 && !error) if (fdatasync(fileno(file_)) && !error)
error = errno; error = errno;
// Report the first error we found. // Report the first error we found.
if (error) { if (error) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment