From: Sage Weil Date: Mon, 4 Feb 2019 09:51:47 +0000 (-0600) Subject: auth/AuthRegistry: fix locking for get_supported_methods() X-Git-Tag: v14.1.0~183^2~10 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7ba8ee2e044ddb57e75acacb36a0ced205897eb0;p=ceph-ci.git auth/AuthRegistry: fix locking for get_supported_methods() The other read-side accessors all consume this method and don't need their own locking. Signed-off-by: Sage Weil --- diff --git a/src/auth/AuthRegistry.cc b/src/auth/AuthRegistry.cc index 9d325604c0d..b96b0b935a9 100644 --- a/src/auth/AuthRegistry.cc +++ b/src/auth/AuthRegistry.cc @@ -145,6 +145,7 @@ void AuthRegistry::get_supported_methods( std::vector *methods, std::vector *modes) { + std::scoped_lock l(lock); switch (cct->get_module_type()) { case CEPH_ENTITY_TYPE_CLIENT: // i am client