]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: remove superfluous pg get/put around enqueue_op
authorSamuel Just <samuel.just@dreamhost.com>
Fri, 4 May 2012 00:48:20 +0000 (17:48 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 5 Jul 2012 17:14:59 +0000 (10:14 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/OSD.cc

index 31509494a81136a3a1486641bab972a8e573fc5e..9284eb08f6fa0e8c9bbbf0b66e75031238588917 100644 (file)
@@ -4489,10 +4489,8 @@ void OSD::handle_pg_scan(OpRequestRef op)
   pg = _lookup_lock_pg(m->pgid);
   assert(pg);
 
-  pg->get();
   enqueue_op(pg, op);
   pg->unlock();
-  pg->put();
 }
 
 void OSD::handle_pg_backfill(OpRequestRef op)
@@ -4520,10 +4518,8 @@ void OSD::handle_pg_backfill(OpRequestRef op)
   pg = _lookup_lock_pg(m->pgid);
   assert(pg);
 
-  pg->get();
   enqueue_op(pg, op);
   pg->unlock();
-  pg->put();
 }
 
 
@@ -5162,10 +5158,8 @@ void OSD::handle_op(OpRequestRef op)
   }
 
 
-  pg->get();
   enqueue_op(pg, op);
   pg->unlock();
-  pg->put();
 }
 
 bool OSD::op_has_sufficient_caps(PG *pg, MOSDOp *op)
@@ -5228,10 +5222,8 @@ void OSD::handle_sub_op(OpRequestRef op)
   if (!pg) {
     return;
   }
-  pg->get();
   enqueue_op(pg, op);
   pg->unlock();
-  pg->put();
 }
 
 void OSD::handle_sub_op_reply(OpRequestRef op)
@@ -5263,10 +5255,8 @@ void OSD::handle_sub_op_reply(OpRequestRef op)
   if (!pg) {
     return;
   }
-  pg->get();
   enqueue_op(pg, op);
   pg->unlock();
-  pg->put();
 }
 
 bool OSD::op_is_discardable(MOSDOp *op)