From 2248822b2c1534a520e4e536c89a6bdd2e2bfdf7 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 22 Oct 2012 10:45:36 -0700 Subject: [PATCH] osd: drop conditional check in populate_obc_watchers 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 Reviewed-by: Samuel Just --- src/osd/ReplicatedPG.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index cdc055987cbcd..153984d34a0b7 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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()) { -- 2.39.5