From e7e7fdb903b07c8c960dbb2780b6332e9eb0612a Mon Sep 17 00:00:00 2001 From: John Spray Date: Sat, 23 Aug 2014 20:03:47 +0100 Subject: [PATCH] osdc/Objecter: fix ref counts in *Map_Latest These contexts were putting before continuing to use the CommandOp/LingerOp. I added an assert to reflect that, which was hitting (#9207). This change is to remove the assertion and put the put() in the right place (and the end of the function). Fixes: #9207 Signed-off-by: John Spray --- src/osdc/Objecter.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 27a203649c40d..0f6a61321435a 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -1072,9 +1072,6 @@ void Objecter::C_Linger_Map_Latest::finish(int r) LingerOp *op = iter->second; objecter->check_latest_map_lingers.erase(iter); - assert(op->get_nref() > 1); // something other than check_latest_map_lingers should - // have a ref to this guy too - op->put(); if (op->map_dne_bound == 0) op->map_dne_bound = latest; @@ -1085,6 +1082,8 @@ void Objecter::C_Linger_Map_Latest::finish(int r) if (unregister) { objecter->_unregister_linger(op->linger_id); } + + op->put(); } void Objecter::_check_linger_pool_dne(LingerOp *op, bool *need_unregister) @@ -1155,12 +1154,13 @@ void Objecter::C_Command_Map_Latest::finish(int r) CommandOp *c = iter->second; objecter->check_latest_map_commands.erase(iter); - c->put(); if (c->map_dne_bound == 0) c->map_dne_bound = latest; objecter->_check_command_map_dne(c); + + c->put(); } void Objecter::_check_command_map_dne(CommandOp *c) -- 2.39.5