]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix `tell session evict`
authorJohn Spray <john.spray@redhat.com>
Wed, 11 Nov 2015 11:11:44 +0000 (11:11 +0000)
committerJohn Spray <john.spray@redhat.com>
Tue, 5 Jan 2016 00:47:54 +0000 (00:47 +0000)
Don't try waiting on empty context gatherbuilder.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDSRank.cc

index fcb8efdda4bd765b01729f7510bfca972e44fe2a..ba03d133130206ba046bd520754290c1e8502be5 100644 (file)
@@ -1795,8 +1795,14 @@ std::vector<entity_name_t> MDSRankDispatcher::evict_sessions(
     }
   }
 
+  dout(20) << __func__ << " matched " << victims.size() << " sessions" << dendl;
+
   std::vector<entity_name_t> result;
 
+  if (victims.empty()) {
+    return result;
+  }
+
   C_SaferCond on_safe;
   C_GatherBuilder gather(g_ceph_context, &on_safe);
   for (const auto s : victims) {