]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os: don't crash on no-journal case
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Sun, 9 Jan 2011 21:34:40 +0000 (13:34 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Sun, 9 Jan 2011 21:34:40 +0000 (13:34 -0800)
JournalingObjectStore::commit_start should handle the case where journal is
null. This will occur if the user doesn't configure a journal.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
src/os/JournalingObjectStore.cc

index 464371b4cd1e327ca67d0ced9d3d6fe07d6170e3..afe006f269c4ad6f80c3ab63ab45bfd11a13c70f 100644 (file)
@@ -194,7 +194,8 @@ bool JournalingObjectStore::commit_start()
   ret = true;
 
  out:
-  journal->commit_start();  // tell the journal too
+  if (journal)
+    journal->commit_start();  // tell the journal too
   journal_lock.Unlock();
   return ret;
 }