@@ -88,8 +88,8 @@ using crimson::common::local_conf;
8888 [existed=existed, clone=std::move (clone),
8989 func=std::move (func), head=std::move (head), this ]() mutable
9090 -> load_obc_iertr::future<> {
91- auto loaded = get_or_load_obc<State>(clone, existed);
92- return loaded .safe_then_interruptible (
91+ return get_or_load_obc<State>(clone, existed
92+ ) .safe_then_interruptible (
9393 [func = std::move (func), head=std::move (head)](auto clone) mutable {
9494 clone->set_clone_ssc (head->ssc );
9595 return std::move (func)(std::move (head), std::move (clone));
@@ -151,20 +151,17 @@ using crimson::common::local_conf;
151151 obc->invalidated_by_interval_change );
152152 return interruptor::with_lock (obc->loading_mutex ,
153153 [this , obc, existed, FNAME] {
154- auto loaded =
155- load_obc_iertr::make_ready_future<ObjectContextRef>(obc);
156154 if (existed) {
157155 ceph_assert (obc->is_valid () && obc->is_loaded ());
158156 DEBUGDPP (" cache hit on {}" , dpp, obc->get_oid ());
157+ return load_obc_iertr::make_ready_future<ObjectContextRef>(obc);
159158 } else {
160159 DEBUGDPP (" cache miss on {}" , dpp, obc->get_oid ());
161- loaded =
162- obc->template with_promoted_lock <State, IOInterruptCondition>(
160+ return obc->template with_promoted_lock <State, IOInterruptCondition>(
163161 [obc, this ] {
164162 return load_obc (obc);
165163 });
166164 }
167- return loaded;
168165 });
169166 }
170167
0 commit comments