]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/ActivePyModules: handle_command - fix broken lock 27939/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 10 Apr 2019 03:25:02 +0000 (11:25 +0800)
committerPrashant D <pdhange@redhat.com>
Fri, 3 May 2019 00:39:38 +0000 (20:39 -0400)
by unlocking properly when module is not available.

Fixes: http://tracker.ceph.com/issues/39235
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit 377de7af5fec521642cc781ac67d555d98ea5e03)

src/mgr/ActivePyModules.cc

index 9e32dce58cac9200c47e77bc1f1a0636960c018e..b5d7ee15ef71012a7fdbcdc23fd851c8ac54f4d5 100644 (file)
@@ -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;
   }