Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759485Ab0KPO0Q (ORCPT ); Tue, 16 Nov 2010 09:26:16 -0500 Received: from ipmail05.adl6.internode.on.net ([150.101.137.143]:2280 "EHLO ipmail05.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758443Ab0KPOX6 (ORCPT ); Tue, 16 Nov 2010 09:23:58 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AogKAKMh4kx5Ldur/2dsb2JhbACUX4ECjH1yvmaFSwSKWIUQ Message-Id: <20101116142030.218100111@kernel.dk> User-Agent: quilt/0.48-1 Date: Wed, 17 Nov 2010 01:09:21 +1100 From: Nick Piggin To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [patch 21/28] fs: dcache reduce locking in d_alloc References: <20101116140900.039761100@kernel.dk> Content-Disposition: inline; filename=fs-dcache-d_alloc-less-d_lock.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1070 Lines: 33 Signed-off-by: Nick Piggin --- fs/dcache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Index: linux-2.6/fs/dcache.c =================================================================== --- linux-2.6.orig/fs/dcache.c 2010-11-17 00:52:37.000000000 +1100 +++ linux-2.6/fs/dcache.c 2010-11-17 01:05:39.000000000 +1100 @@ -1220,11 +1220,13 @@ struct dentry *d_alloc(struct dentry * p if (parent) { spin_lock(&parent->d_lock); - spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); + /* + * don't need child lock because it is not subject + * to concurrency here + */ dentry->d_parent = dget_dlock(parent); dentry->d_sb = parent->d_sb; list_add(&dentry->d_u.d_child, &parent->d_subdirs); - spin_unlock(&dentry->d_lock); spin_unlock(&parent->d_lock); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/