]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: drop conditional check in populate_obc_watchers
authorSage Weil <sage@inktank.com>
Mon, 22 Oct 2012 17:45:36 +0000 (10:45 -0700)
committerSage Weil <sage@inktank.com>
Mon, 22 Oct 2012 17:45:36 +0000 (10:45 -0700)
Turn these into asserts.  The only two callers are create_object_context()
and get_object_context(), and they only get called when the object is no
longer missing.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index cdc055987cbcd3b5dc2bd92746edeb407ea664db..153984d34a0b7337c97211c8426fe216aa69a03c 100644 (file)
@@ -3966,11 +3966,8 @@ void ReplicatedPG::repop_ack(RepGather *repop, int result, int ack_type,
 
 void ReplicatedPG::populate_obc_watchers(ObjectContext *obc)
 {
-  if (!is_active() ||
-      is_missing_object(obc->obs.oi.soid)) {
-    dout(10) << "populate_obc_watchers " << obc->obs.oi.soid << " !active or missing, waiting" << dendl;
-    return;
-  }
+  assert(is_active());
+  assert(!is_missing_object(obc->obs.oi.soid));
 
   dout(10) << "populate_obc_watchers " << obc->obs.oi.soid << dendl;
   if (!obc->obs.oi.watchers.empty()) {