From 39c8941c5a18c107c78f5900dc8bc0d42edc8e32 Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Mon, 14 Dec 2020 10:52:43 +0800 Subject: [PATCH] crimson/osd: allow obc to promote lock state from none to excl Signed-off-by: Xuehan Xu --- src/crimson/osd/object_context.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/crimson/osd/object_context.h b/src/crimson/osd/object_context.h index e479ac8ee5672..12607ede9ec13 100644 --- a/src/crimson/osd/object_context.h +++ b/src/crimson/osd/object_context.h @@ -146,6 +146,8 @@ public: return _with_lock(lock.excl_from_read(), std::forward(func)); case RWState::RWEXCL: return _with_lock(lock.excl_from_excl(), std::forward(func)); + case RWState::RWNONE: + return _with_lock(lock.for_excl(), std::forward(func)); default: assert(0 == "noop"); } -- 2.39.5