From patchwork Mon Sep 2 07:19:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 2852682 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 358B99F499 for ; Mon, 2 Sep 2013 07:20:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED69820221 for ; Mon, 2 Sep 2013 07:20:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A35E620201 for ; Mon, 2 Sep 2013 07:20:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758138Ab3IBHUZ (ORCPT ); Mon, 2 Sep 2013 03:20:25 -0400 Received: from mga01.intel.com ([192.55.52.88]:34488 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755708Ab3IBHUY (ORCPT ); Mon, 2 Sep 2013 03:20:24 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 02 Sep 2013 00:20:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,1005,1367996400"; d="scan'208";a="395456500" Received: from zyan5-mobl.sh.intel.com ([10.239.13.101]) by fmsmga002.fm.intel.com with ESMTP; 02 Sep 2013 00:19:59 -0700 From: "Yan, Zheng" To: ceph-devel@vger.kernel.org Cc: sage@inktank.com, "Yan, Zheng" Subject: [PATCH 1/2] ceph: remove ceph_lookup_inode() Date: Mon, 2 Sep 2013 15:19:53 +0800 Message-Id: <1378106394-14481-1-git-send-email-zheng.z.yan@intel.com> X-Mailer: git-send-email 1.8.1.4 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Yan, Zheng" commit 6f60f889 (ceph: fix freeing inode vs removing session caps race) introduced ceph_lookup_inode(). But there is already a ceph_find_inode() which provides similar function. So remove ceph_lookup_inode(), use ceph_find_inode() instead. Signed-off-by: Yan, Zheng Reviewed-by: Alex Elder --- fs/ceph/inode.c | 8 -------- fs/ceph/mds_client.c | 2 +- fs/ceph/super.h | 2 -- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index eae41cd..8549a48 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -62,14 +62,6 @@ struct inode *ceph_get_inode(struct super_block *sb, struct ceph_vino vino) return inode; } -struct inode *ceph_lookup_inode(struct super_block *sb, struct ceph_vino vino) -{ - struct inode *inode; - ino_t t = ceph_vino_to_ino(vino); - inode = ilookup5_nowait(sb, t, ceph_ino_compare, &vino); - return inode; -} - /* * get/constuct snapdir inode for a given directory */ diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 603786b..b7bda5d 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -1054,7 +1054,7 @@ static void remove_session_caps(struct ceph_mds_session *session) vino = cap->ci->i_vino; spin_unlock(&session->s_cap_lock); - inode = ceph_lookup_inode(sb, vino); + inode = ceph_find_inode(sb, vino); iput(inode); spin_lock(&session->s_cap_lock); diff --git a/fs/ceph/super.h b/fs/ceph/super.h index bb23ef6..6014b0a 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -694,8 +694,6 @@ extern void ceph_destroy_inode(struct inode *inode); extern struct inode *ceph_get_inode(struct super_block *sb, struct ceph_vino vino); -extern struct inode *ceph_lookup_inode(struct super_block *sb, - struct ceph_vino vino); extern struct inode *ceph_get_snapdir(struct inode *parent); extern int ceph_fill_file_size(struct inode *inode, int issued, u32 truncate_seq, u64 truncate_size, u64 size);