diff options
-rw-r--r-- | xlators/storage/posix/src/posix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 5decac295ff..330fb74a550 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -2946,12 +2946,13 @@ posix_fsync (call_frame_t *frame, xlator_t *this, } if (datasync) { - ; op_ret = sys_fdatasync (_fd); if (op_ret == -1) { + op_errno = errno; gf_log (this->name, GF_LOG_ERROR, "fdatasync on fd=%p failed: %s", fd, strerror (errno)); + goto out; } } else { op_ret = sys_fsync (_fd); |