From patchwork Mon Aug 17 08:43:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ma, Jianpeng" X-Patchwork-Id: 7023901 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 047ED9F344 for ; Mon, 17 Aug 2015 08:43:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 390AD205DD for ; Mon, 17 Aug 2015 08:43:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 28637205DC for ; Mon, 17 Aug 2015 08:43:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751073AbbHQIni (ORCPT ); Mon, 17 Aug 2015 04:43:38 -0400 Received: from mga14.intel.com ([192.55.52.115]:30852 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750754AbbHQIni convert rfc822-to-8bit (ORCPT ); Mon, 17 Aug 2015 04:43:38 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 17 Aug 2015 01:43:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,693,1432623600"; d="scan'208";a="749984167" Received: from pgsmsx104.gar.corp.intel.com ([10.221.44.91]) by orsmga001.jf.intel.com with ESMTP; 17 Aug 2015 01:43:29 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX104.gar.corp.intel.com (10.221.44.91) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 17 Aug 2015 16:43:28 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.171]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.143]) with mapi id 14.03.0224.002; Mon, 17 Aug 2015 16:43:27 +0800 From: "Ma, Jianpeng" To: Sage Weil , "zyan@redhat.com" CC: "ceph-devel@vger.kernel.org" Subject: [PATCH] fs/ceph: No need get inode of parent in ceph_open. Thread-Topic: [PATCH] fs/ceph: No need get inode of parent in ceph_open. Thread-Index: AdDYyKeRWdmtlcFCRmCW5l5ksdm2KA== Date: Mon, 17 Aug 2015 08:43:26 +0000 Message-ID: <6AA21C22F0A5DA478922644AD2EC308C1D19FBFC@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-7.5 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 For ceph_open, it already get the parent inode. So no need to get again. Signed-off-by: Jianpeng Ma --- fs/ceph/file.c | 3 --- 1 file changed, 3 deletions(-) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 8b79d87..5ecd3dc 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -210,10 +210,7 @@ int ceph_open(struct inode *inode, struct file *file) ihold(inode); req->r_num_caps = 1; - if (flags & O_CREAT) - parent_inode = ceph_get_dentry_parent_inode(file->f_path.dentry); err = ceph_mdsc_do_request(mdsc, parent_inode, req); - iput(parent_inode); if (!err) err = ceph_init_file(inode, file, req->r_fmode); ceph_mdsc_put_request(req);