From patchwork Mon Sep 24 11:27:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 1497411 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 7E683DF280 for ; Mon, 24 Sep 2012 11:27:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754270Ab2IXL1O (ORCPT ); Mon, 24 Sep 2012 07:27:14 -0400 Received: from mga01.intel.com ([192.55.52.88]:24645 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753376Ab2IXL1M (ORCPT ); Mon, 24 Sep 2012 07:27:12 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 24 Sep 2012 04:27:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,474,1344236400"; d="scan'208";a="225716577" Received: from unknown (HELO zyan5-mobl.ccr.corp.intel.com) ([10.255.21.23]) by fmsmga001.fm.intel.com with ESMTP; 24 Sep 2012 04:27:10 -0700 From: "Yan, Zheng" To: sage@inktank.com, ceph-devel@vger.kernel.org Cc: "Yan, Zheng" Subject: [PATCH V2 1/2] mds: Fix SessionMap::is_any_state() Date: Mon, 24 Sep 2012 19:27:08 +0800 Message-Id: <1348486029-1125-1-git-send-email-zheng.z.yan@intel.com> X-Mailer: git-send-email 1.7.11.4 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org From: "Yan, Zheng" is_any_state() should return false when the by_state list is empty. Signed-off-by: Yan, Zheng --- src/mds/SessionMap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/SessionMap.h b/src/mds/SessionMap.h index fcd0b47..6bca361 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; }