From patchwork Wed Jul 3 20:22:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Waiman Long X-Patchwork-Id: 2836840 Return-Path: X-Original-To: patchwork-ocfs2-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 517729FA21 for ; Thu, 1 Aug 2013 07:28:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 70AF920263 for ; Thu, 1 Aug 2013 07:28:23 +0000 (UTC) Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 445D320233 for ; Thu, 1 Aug 2013 07:28:22 +0000 (UTC) Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r717S36k026880 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Aug 2013 07:28:04 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r717S1iq004093 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Aug 2013 07:28:02 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1V4nIn-0005j2-OF; Thu, 01 Aug 2013 00:28:01 -0700 Received: from ucsinet21.oracle.com ([156.151.31.93]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1UuTZC-0006ZB-B8 for ocfs2-devel@oss.oracle.com; Wed, 03 Jul 2013 13:22:18 -0700 Received: from aserp1020.oracle.com (aserp1020.oracle.com [141.146.126.67]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r63KMG84000686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 3 Jul 2013 20:22:17 GMT Received: from g1t0027.austin.hp.com (g1t0027.austin.hp.com [15.216.28.34]) by aserp1020.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r63KMFsc022901 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 3 Jul 2013 20:22:16 GMT Received: from g1t0039.austin.hp.com (g1t0039.austin.hp.com [16.236.32.45]) by g1t0027.austin.hp.com (Postfix) with ESMTP id 6733F38708; Wed, 3 Jul 2013 20:22:15 +0000 (UTC) Received: from RHEL64.localdomain (unknown [16.99.82.253]) by g1t0039.austin.hp.com (Postfix) with ESMTP id 8E1813484A; Wed, 3 Jul 2013 20:22:13 +0000 (UTC) From: Waiman Long To: Date: Wed, 3 Jul 2013 16:22:02 -0400 Message-Id: <1372882922-23205-1-git-send-email-Waiman.Long@hp.com> X-Mailer: git-send-email 1.7.1 To: Alexander Viro , Jeff Layton , Miklos Szeredi , Ingo Molnar , Thomas Gleixner X-Flow-Control-Info: class=Pass-to-MM reputation=ipRisk-All ip=15.216.28.34 ct-class=R4 ct-vol1=-82 ct-vol2=7 ct-vol3=6 ct-risk=26 ct-spam1=35 ct-spam2=1 ct-bulk=92 rcpts=1 size=1254 X-Sendmail-CM-Score: 0.00% X-Sendmail-CM-Analysis: v=2.1 cv=I7VcGrQg c=1 sm=1 tr=0 a=DdI9fMSBRa2/DXoSzmxAFQ==:117 a=DdI9fMSBRa2/DXoSzmxAFQ==:17 a=0ZI53cBpXHAA:10 a=KI2_uoU9iZQA:10 a=cH6R9-kdAAAA:8 a=oTr-eTuwQzMA:10 a=Td122CBJfVzRZRScek0A:9 a=bt0zGP92IBIA:10 X-Sendmail-CT-Classification: not spam X-Sendmail-CT-RefID: str=0001.0A090202.51D487F8.0078:SCFSTAT3666957, ss=1, re=-4.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-Mailman-Approved-At: Thu, 01 Aug 2013 00:27:57 -0700 Cc: Waiman Long , Peter Zijlstra , Mark Fasheh , linux-kernel@vger.kernel.org, Steven Rostedt , "Chandramouleeswaran, Aswin" , "Norton, Scott J" , Andi Kleen , Benjamin Herrenschmidt , linux-fsdevel@vger.kernel.org, Linus Torvalds , ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH v3 22/25] ocfs2: Change how dentry's d_lock field is accessed X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED, 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 Because of the changes made in dcache.h header file, files that use the d_lock field of the dentry structure need to be changed accordingly. All the d_lock's spin_lock() and spin_unlock() calls are replaced by the corresponding d_lock() and d_unlock() calls. There is no change in logic and everything should just work. Signed-off-by: Waiman Long --- fs/ocfs2/dcache.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/dcache.c b/fs/ocfs2/dcache.c index ef99972..4f72906 100644 --- a/fs/ocfs2/dcache.c +++ b/fs/ocfs2/dcache.c @@ -173,17 +173,17 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode, spin_lock(&inode->i_lock); hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { - spin_lock(&dentry->d_lock); + d_lock(dentry); if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) { trace_ocfs2_find_local_alias(dentry->d_name.len, dentry->d_name.name); dget_dlock(dentry); - spin_unlock(&dentry->d_lock); + d_unlock(dentry); spin_unlock(&inode->i_lock); return dentry; } - spin_unlock(&dentry->d_lock); + d_unlock(dentry); } spin_unlock(&inode->i_lock); return NULL;