]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/ActivePyModules: handle_command - fix broken lock 27485/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 10 Apr 2019 03:25:02 +0000 (11:25 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 11 Apr 2019 00:38:47 +0000 (08:38 +0800)
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>
src/mgr/ActivePyModules.cc

index 745a34e301b9a9d26afa960d666c3f78f9261713..f4fc0c173fc131d6ee1e5a0e767d58f861b7d403 100644 (file)
@@ -909,6 +909,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;
   }