From: xie xingguo Date: Wed, 10 Apr 2019 03:25:02 +0000 (+0800) Subject: mgr/ActivePyModules: handle_command - fix broken lock X-Git-Tag: v14.2.2~194^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F27939%2Fhead;p=ceph.git mgr/ActivePyModules: handle_command - fix broken lock by unlocking properly when module is not available. Fixes: http://tracker.ceph.com/issues/39235 Signed-off-by: xie xingguo (cherry picked from commit 377de7af5fec521642cc781ac67d555d98ea5e03) --- diff --git a/src/mgr/ActivePyModules.cc b/src/mgr/ActivePyModules.cc index 9e32dce58cac..b5d7ee15ef71 100644 --- a/src/mgr/ActivePyModules.cc +++ b/src/mgr/ActivePyModules.cc @@ -912,6 +912,7 @@ int ActivePyModules::handle_command( auto mod_iter = modules.find(module_name); if (mod_iter == modules.end()) { *ss << "Module '" << module_name << "' is not available"; + lock.Unlock(); return -ENOENT; }