From patchwork Wed May 11 10:29:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henry Chang X-Patchwork-Id: 776742 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4BGBfH4009086 for ; Wed, 11 May 2011 16:11:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757123Ab1EKQLO (ORCPT ); Wed, 11 May 2011 12:11:14 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:47209 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754578Ab1EKQLN (ORCPT ); Wed, 11 May 2011 12:11:13 -0400 Received: by pvg12 with SMTP id 12so303861pvg.19 for ; Wed, 11 May 2011 09:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=/nSm1dwiRbO8bdougjoMWDAMzv3AZteq0EzcUF4AxEw=; b=nri+2KeLSWCPmIazhw4deXh3af9nSMlZVXGNJ09eC4N6hZi+l0Iu9vIsPVvEt6NAtu iuY12IbmICHk5RmccZ97tN6uzeDC0B2Dw5Saf5T6ir1Tj20B9dw5DTHMDxUWWAB9sToo sAOdd5NrkyOVEDQZXiFdImkEifGXBTGkCse4I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=pMaU4RyjIf4/AWMiGq/wzU1CXBd0UpUsJjSLjvGpFigr0MwjwQpmKtp9wFbPkq4M1j n/SMun87ISj0c3meah1YIbCQ0Xk5pJCphh1wfJSKPU6Bk1WNLotGw64lIK/XiIN23mlR mA6F742MM2N7DoeHAYFqaJ51tSZz9Bel1I8Gs= Received: by 10.68.17.7 with SMTP id k7mr3770164pbd.322.1305109991485; Wed, 11 May 2011 03:33:11 -0700 (PDT) Received: from localhost.localdomain ([122.146.30.126]) by mx.google.com with ESMTPS id h9sm911033pbc.36.2011.05.11.03.33.08 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 May 2011 03:33:09 -0700 (PDT) From: Henry C Chang To: ceph-devel@vger.kernel.org Cc: Henry C Chang Subject: [PATCH 1/3] ceph: print debug message before put mds session Date: Wed, 11 May 2011 10:29:52 +0000 Message-Id: <1305109794-7967-1-git-send-email-henry.cy.chang@gmail.com> X-Mailer: git-send-email 1.7.2.3 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 11 May 2011 16:11:51 +0000 (UTC) The mds session, s, could be freed during ceph_put_mds_session. Move dout before ceph_put_mds_session. Signed-off-by: Henry C Chang --- fs/ceph/mds_client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index f60b07b..d0fae4c 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -3304,8 +3304,8 @@ static void con_put(struct ceph_connection *con) { struct ceph_mds_session *s = con->private; + dout("mdsc con_put %p (%d)\n", s, atomic_read(&s->s_ref) - 1); ceph_put_mds_session(s); - dout("mdsc con_put %p (%d)\n", s, atomic_read(&s->s_ref)); } /*