]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: gracefully exit when create_object_store() returns NULL
authorYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 22 Dec 2008 21:13:20 +0000 (13:13 -0800)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 22 Dec 2008 21:13:20 +0000 (13:13 -0800)
src/osd/OSD.cc

index 36dad35ca9e563f5d8976bae35f5a202668abc8d..832ec3fc27e4962df31e4ad0147ceefe6fc98d04 100644 (file)
@@ -220,6 +220,8 @@ int OSD::mkfs(const char *dev, ceph_fsid fsid, int whoami)
 int OSD::peek_super(const char *dev, nstring& magic, ceph_fsid& fsid, int& whoami)
 {
   ObjectStore *store = create_object_store(dev);
+  if (!store)
+       return -ENODEV;
   int err = store->mount();
   if (err < 0) 
     return err;