]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: allow obc to promote lock state from none to excl
authorXuehan Xu <xxhdx1985126@gmail.com>
Mon, 14 Dec 2020 02:52:43 +0000 (10:52 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Mon, 14 Dec 2020 03:00:01 +0000 (11:00 +0800)
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
src/crimson/osd/object_context.h

index e479ac8ee56720aca32ab6c2e66d9dcd4d038f4f..12607ede9ec1305e1742bccba44d443caedddeee 100644 (file)
@@ -146,6 +146,8 @@ public:
       return _with_lock(lock.excl_from_read(), std::forward<Func>(func));
     case RWState::RWEXCL:
       return _with_lock(lock.excl_from_excl(), std::forward<Func>(func));
+    case RWState::RWNONE:
+      return _with_lock(lock.for_excl(), std::forward<Func>(func));
      default:
       assert(0 == "noop");
     }