From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: [patch 14/52] fs: dcache scale subdirs Date: Fri, 25 Jun 2010 01:53:49 +1000 Message-ID: <20100624155349.GJ10441@laptop> References: <20100624030212.676457061@suse.de> <20100624030727.818410048@suse.de> <87pqzgaheu.fsf@basil.nowhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, John Stultz , Frank Mayhar To: Andi Kleen Return-path: Content-Disposition: inline In-Reply-To: <87pqzgaheu.fsf@basil.nowhere.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Jun 24, 2010 at 11:50:17AM +0200, Andi Kleen wrote: > npiggin@suse.de writes: > > > Protect d_subdirs and d_child with d_lock, except in filesystems that aren't > > using dcache_lock for these anyway (eg. using i_mutex). > > Different locking for different file systems seems a bit confusing. > Could the be unified? Yes well it is a bit misleading. It should always be modified under spinlocks, but some filesystems are using i_mutex for read access, which should be fine (and not require knowledge of any other code).