From: Yan, Zheng Date: Mon, 24 Sep 2012 11:27:08 +0000 (+0800) Subject: mds: Fix SessionMap::is_any_state() X-Git-Tag: v0.53~41^2~25 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=37881a32d10c3275f6d4bc4a17ac690baec0e597;p=ceph.git mds: Fix SessionMap::is_any_state() is_any_state() should return false when the by_state list is empty. Signed-off-by: Yan, Zheng Signed-off-by: Sage Weil --- diff --git a/src/mds/SessionMap.h b/src/mds/SessionMap.h index fcd0b477d23b..6bca3611e59e 100644 --- a/src/mds/SessionMap.h +++ b/src/mds/SessionMap.h @@ -248,7 +248,7 @@ public: bool is_any_state(int state) { map* >::iterator p = by_state.find(state); - if (p == by_state.end()) + if (p == by_state.end() || p->second->empty()) return false; return true; }