]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
auth/AuthRegistry: fix locking for get_supported_methods()
authorSage Weil <sage@redhat.com>
Mon, 4 Feb 2019 09:51:47 +0000 (03:51 -0600)
committerSage Weil <sage@redhat.com>
Thu, 7 Feb 2019 18:10:34 +0000 (12:10 -0600)
The other read-side accessors all consume this method and don't
need their own locking.

Signed-off-by: Sage Weil <sage@redhat.com>
src/auth/AuthRegistry.cc

index 9d325604c0d718384131eeae826888a9e3b969b7..b96b0b935a9c7ffe5c3d3065c89f3477615196e0 100644 (file)
@@ -145,6 +145,7 @@ void AuthRegistry::get_supported_methods(
   std::vector<uint32_t> *methods,
   std::vector<uint32_t> *modes)
 {
+  std::scoped_lock l(lock);
   switch (cct->get_module_type()) {
   case CEPH_ENTITY_TYPE_CLIENT:
     // i am client