]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: drop _do_open helper
authorSage Weil <sage@newdream.net>
Fri, 30 Jan 2009 18:07:06 +0000 (10:07 -0800)
committerSage Weil <sage@newdream.net>
Fri, 30 Jan 2009 19:44:33 +0000 (11:44 -0800)
only one caller

src/mds/Server.cc
src/mds/Server.h

index a08a30b76fb593c859ab86998aef7d903053d677..742692e961fc8b9a6b48125abe63b62ac4df3e4c 100644 (file)
@@ -4952,26 +4952,12 @@ void Server::handle_client_open(MDRequest *mdr)
     if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks))
       return;
   }
-  
-  // do it
-  _do_open(mdr, cur);
-}
 
-void Server::_do_open(MDRequest *mdr, CInode *cur)
-{
-  MClientRequest *req = mdr->client_request;
-  int cmode = ceph_flags_to_mode(req->head.args.open.flags);
-  if (cur->inode.is_dir()) 
-    cmode = CEPH_FILE_MODE_PIN;
 
   if (mdr->ref_snapid == CEPH_NOSNAP) {
     // register new cap
     bool is_new = false;
     Capability *cap = mds->locker->issue_new_caps(cur, cmode, mdr->session, is_new);
-    
-    // drop our locks (they may interfere with us issuing new caps)
-    //mdcache->request_drop_locks(mdr);
-    
     if (is_new)
       cap->dec_suppress();  // stop suppressing messages on new cap
     
index ef6b566c2382151f74d967d395e39e48ef3f7dfd..d6c6eb745e1c771b247ff02f754821533bb79630 100644 (file)
@@ -124,7 +124,6 @@ public:
   void handle_client_open(MDRequest *mdr);
   void handle_client_openc(MDRequest *mdr);  // O_CREAT variant.
   void handle_client_opent(MDRequest *mdr);  // O_TRUNC variant.
-  void _do_open(MDRequest *mdr, CInode *ref);
 
   // namespace changes
   void handle_client_mknod(MDRequest *mdr);