Fix FileFd::sync_barrier.

This commit is contained in:
levlam 2023-02-10 15:17:07 +03:00
parent 8df048c0d2
commit 852a1640b0

View File

@ -638,7 +638,7 @@ Status FileFd::sync() {
Status FileFd::sync_barrier() {
CHECK(!empty());
#if TD_DARWIN && defined(F_BARRIERFSYNC)
if (detail::skip_eintr([&] { return fcntl(get_native_fd().fd(), F_BARRIERFSYNC); }) == -1) {
if (detail::skip_eintr([&] { return fcntl(get_native_fd().fd(), F_BARRIERFSYNC); }) != -1) {
return Status::OK();
}
#endif