]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FileJournal.cc: fix _open() to return negative value in error case 2922/head
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 14 Nov 2014 22:16:54 +0000 (23:16 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 14 Nov 2014 22:16:54 +0000 (23:16 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/os/FileJournal.cc

index 5cebfeb4183594838f2099377665bd13c692404c..f13f6563c7d0df2d1e3665075926c803e24aa962 100644 (file)
@@ -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;
     }
   }