From 40e4cad551fba02ad9194206e0e53c2521e8abf7 Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Wed, 2 Dec 2020 16:47:10 +0800 Subject: [PATCH] crimson/osd: call ObjectContext::with_promoted_lock() with the currently demanding lock type Signed-off-by: Xuehan Xu --- src/crimson/osd/pg.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 5f8129c62ca1c..38d1c481734bc 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -808,7 +808,7 @@ PG::with_head_obc(hobject_t oid, with_obc_func_t&& func) logger().debug("with_head_obc: found {} in cache", oid); } else { logger().debug("with_head_obc: cache miss on {}", oid); - loaded = obc->with_promoted_lock([this, obc] { + loaded = obc->with_promoted_lock([this, obc] { return load_head_obc(obc); }); } @@ -841,7 +841,7 @@ PG::with_clone_obc(hobject_t oid, with_obc_func_t&& func) logger().debug("with_clone_obc: found {} in cache", coid); } else { logger().debug("with_clone_obc: cache miss on {}", coid); - loaded = clone->template with_promoted_lock( + loaded = clone->template with_promoted_lock( [coid, clone, head, this] { return backend->load_metadata(coid).safe_then( [coid, clone=std::move(clone), head=std::move(head)](auto md) mutable { -- 2.39.5