]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove unnecessary silent fallout from add_primary_dentry.
authorGreg Farnum <gregf@hq.newdream.net>
Fri, 20 Aug 2010 18:47:03 +0000 (11:47 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Fri, 20 Aug 2010 18:47:03 +0000 (11:47 -0700)
src/mds/Server.cc
src/mds/events/EMetaBlob.h

index ebdf6f9faf158922e03ff49eab35ce6a4d27a1af..2975c82ae97539ac257c8fabdfde3d0e6a7c6df6 100644 (file)
@@ -5653,10 +5653,6 @@ void Server::handle_client_mksnap(MDRequest *mdr)
     reply_request(mdr, -ENOTDIR);
     return;
   }
-/*  if (diri->is_system()) {  // no snaps on root dir, at least not until we can store it
-    reply_request(mdr, -EPERM);
-    return;
-  }*/
 
   const string &snapname = req->get_filepath().last_dentry();
   dout(10) << "mksnap " << snapname << " on " << *diri << dendl;
index dc6af797d5840bf20a1170300ef6bc4ac912648b..ca1435903e5387f018263fba44361f6f01f5d54e 100644 (file)
@@ -507,10 +507,8 @@ private:
   inode_t *add_primary_dentry(CDentry *dn, bool dirty, 
                              CInode *in=0, fragtree_t *pdft=0, bufferlist *psnapbl=0,
                              map<string,bufferptr> *px=0) {
-    if (dn)
-      return add_primary_dentry(add_dir(dn->get_dir(), false),
-                             dn, dirty, in, pdft, psnapbl, px);
-    else return NULL;
+    return add_primary_dentry(add_dir(dn->get_dir(), false),
+                              dn, dirty, in, pdft, psnapbl, px);
   }
   inode_t *add_primary_dentry(dirlump& lump, CDentry *dn, bool dirty, 
                              CInode *in=0, fragtree_t *pdft=0, bufferlist *psnapbl=0,