]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Fix SessionMap::is_any_state()
authorYan, Zheng <zheng.z.yan@intel.com>
Mon, 24 Sep 2012 11:27:08 +0000 (19:27 +0800)
committerSage Weil <sage@inktank.com>
Tue, 25 Sep 2012 03:29:18 +0000 (20:29 -0700)
is_any_state() should return false when the by_state list is empty.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
src/mds/SessionMap.h

index fcd0b477d23b08cdb46442a63a3fef52590e1e5c..6bca3611e59e39b8b9ab672feee454ce514aefc7 100644 (file)
@@ -248,7 +248,7 @@ public:
 
   bool is_any_state(int state) {
     map<int,xlist<Session*>* >::iterator p = by_state.find(state);
-    if (p == by_state.end())
+    if (p == by_state.end() || p->second->empty())
       return false;
     return true;
   }