os: don't crash on no-journal case

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>
This commit is contained in:
Colin Patrick McCabe 2011-01-09 13:34:40 -08:00 committed by Sage Weil
parent 6d0dc4bf64
commit 1bae352ed2

View 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;
}