From: Danny Al-Gaaf Date: Fri, 14 Nov 2014 22:16:54 +0000 (+0100) Subject: FileJournal.cc: fix _open() to return negative value in error case X-Git-Tag: v0.90~25^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=50f9edb17dedf7d672a1e48b887a7079e4cbf657;p=ceph.git FileJournal.cc: fix _open() to return negative value in error case Signed-off-by: Danny Al-Gaaf --- diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc index 5cebfeb4183..f13f6563c7d 100644 --- a/src/os/FileJournal.cc +++ b/src/os/FileJournal.cc @@ -85,6 +85,7 @@ int FileJournal::_open(bool forwrite, bool create) if (ret) { ret = errno; derr << "FileJournal::_open: unable to fstat journal: " << cpp_strerror(ret) << dendl; + ret = -ret; goto out_fd; } @@ -109,6 +110,7 @@ int FileJournal::_open(bool forwrite, bool create) if (ret < 0) { ret = errno; derr << "FileJournal::_open: unable to setup io_context " << cpp_strerror(ret) << dendl; + ret = -ret; goto out_fd; } }