diff --git a/util/env_posix.cc b/util/env_posix.cc index ba2667864acb00..63bb4bdcd4ae00 100644 --- a/util/env_posix.cc +++ b/util/env_posix.cc @@ -231,7 +231,7 @@ class PosixWritableFile : public WritableFile { if (fd < 0) { s = IOError(dir, errno); } else { - if (fsync(fd) < 0) { + if (fsync(fd) < 0 && errno != EINVAL) { s = IOError(dir, errno); } close(fd);