From: xie xingguo Date: Mon, 4 Jan 2016 03:26:09 +0000 (+0800) Subject: os: fix return code if unable to sync X-Git-Tag: v10.0.3~82^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=31205ceaadc6a173a087fd1fe31e190747c15a07;p=ceph.git os: fix return code if unable to sync Shall return a negative error code instead. Fixes: #14187 Signed-off-by: xie xingguo --- diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index de2df61a0c4c..6601f8be6a4f 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -821,7 +821,7 @@ int FileStore::mkfs() goto close_fsid_fd; } if (::fsync(fsid_fd) < 0) { - ret = errno; + ret = -errno; derr << "mkfs: close failed: can't write fsid: " << cpp_strerror(ret) << dendl; goto close_fsid_fd;