]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg: fix uses of MClientCaps destructor to use put()
authorGreg Farnum <gregf@hq.newdream.net>
Tue, 30 Mar 2010 23:29:02 +0000 (16:29 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Wed, 31 Mar 2010 21:59:39 +0000 (14:59 -0700)
src/client/Client.cc
src/mds/Locker.cc

index 827299a2775a331ae27c6554b57161571b6a8970..6afa97fe65e98ccd846a7a1cee808e5c9a1c184e 100644 (file)
@@ -2450,7 +2450,7 @@ void Client::handle_caps(MClientCaps *m)
   if (inode_map.count(vino)) in = inode_map[vino];
   if (!in) {
     dout(5) << "handle_caps don't have vino " << vino << dendl;
-    delete m;
+    m->put();
     return;
   }
 
@@ -2462,7 +2462,7 @@ void Client::handle_caps(MClientCaps *m)
 
   if (in->caps.count(mds) == 0) {
     dout(5) << "handle_caps don't have " << *in << " cap on mds" << mds << dendl;
-    delete m;
+    m->put();
     return;
   }
 
@@ -2474,7 +2474,7 @@ void Client::handle_caps(MClientCaps *m)
   case CEPH_CAP_OP_GRANT: return handle_cap_grant(in, mds, cap, m);
   case CEPH_CAP_OP_FLUSH_ACK: return handle_cap_flush_ack(in, mds, cap, m);
   default:
-    delete m;
+    m->put();
   }
 }
 
@@ -2502,7 +2502,7 @@ void Client::handle_cap_import(Inode *in, MClientCaps *m)
            << ", keeping exporting_issued " << ccap_string(in->exporting_issued) 
            << " mseq " << in->exporting_mseq << " by mds" << in->exporting_mds << dendl;
   }
-  delete m;
+  m->put();
 }
 
 void Client::handle_cap_export(Inode *in, MClientCaps *m)
@@ -2539,7 +2539,7 @@ void Client::handle_cap_export(Inode *in, MClientCaps *m)
 
   remove_cap(in, mds);
 
-  delete m;
+  m->put();
 }
 
 void Client::handle_cap_trunc(Inode *in, MClientCaps *m)
@@ -2562,7 +2562,7 @@ void Client::handle_cap_trunc(Inode *in, MClientCaps *m)
   }
   
   in->reported_size = in->size = m->get_size(); 
-  delete m;
+  m->put();
 }
 
 void Client::handle_cap_flush_ack(Inode *in, int mds, InodeCap *cap, MClientCaps *m)
@@ -2599,7 +2599,7 @@ void Client::handle_cap_flush_ack(Inode *in, int mds, InodeCap *cap, MClientCaps
     }
   }
   
-  delete m;
+  m->put();
 }
 
 
@@ -2624,7 +2624,7 @@ void Client::handle_cap_flushsnap_ack(Inode *in, MClientCaps *m)
     // we may not have it if we send multiple FLUSHSNAP requests and (got multiple FLUSHEDSNAPs back)
   }
     
-  delete m;
+  m->put();
 }
 
 
@@ -2706,7 +2706,7 @@ void Client::handle_cap_grant(Inode *in, int mds, InodeCap *cap, MClientCaps *m)
   if (new_caps)
     signal_cond_list(in->waitfor_caps);
 
-  delete m;
+  m->put();
 }
 
 
index 31d4b71a6dc9ca20c38ab5a24ddcbbe12cbc464c..0e405a8c9c73f266b14c9276c8c8ed6b15703371 100644 (file)
@@ -1647,7 +1647,7 @@ void Locker::handle_client_caps(MClientCaps *m)
   CInode *head_in = mdcache->get_inode(m->get_ino());
   if (!head_in) {
     dout(7) << "handle_client_caps on unknown ino " << m->get_ino() << ", dropping" << dendl;
-    delete m;
+    m->put();
     return;
   }
 
@@ -1664,7 +1664,7 @@ void Locker::handle_client_caps(MClientCaps *m)
     cap = in->get_client_cap(client);
   if (!cap) {
     dout(7) << "handle_client_caps no cap for client" << client << " on " << *in << dendl;
-    delete m;
+    m->put();
     return;
   }  
   assert(cap);
@@ -1682,7 +1682,7 @@ void Locker::handle_client_caps(MClientCaps *m)
   if (ceph_seq_cmp(m->get_mseq(), cap->get_mseq()) < 0) {
     dout(7) << "handle_client_caps mseq " << m->get_mseq() << " < " << cap->get_mseq()
            << ", dropping" << dendl;
-    delete m;
+    m->put();
     return;
   }
 
@@ -1793,7 +1793,7 @@ void Locker::handle_client_caps(MClientCaps *m)
   }
   
  out:
-  delete m;
+  m->put();
 }
 
 void Locker::process_cap_update(MDRequest *mdr, client_t client,