From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: [PATCH 14/18] fs: Protect inode->i_state with th einode->i_lock Date: Sat, 16 Oct 2010 18:57:09 +1100 Message-ID: <20101016075709.GP19147@amd> References: <1286515292-15882-1-git-send-email-david@fromorbit.com> <1286515292-15882-15-git-send-email-david@fromorbit.com> <20101008074932.GC24089@infradead.org> <20101008080428.GW4681@dastard> <20101008081843.GB17577@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Dave Chinner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Christoph Hellwig Return-path: Content-Disposition: inline In-Reply-To: <20101008081843.GB17577@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Oct 08, 2010 at 04:18:43AM -0400, Christoph Hellwig wrote: > > > > Ah, done thinking now! I was so the i_state field had been set > > before the inode was added to various lists and potentially > > accessable to other threads. I should probably add a comment to that > > effect, right? > > Yes, please. This is due to i_lock not covering all the icache state of the inode, so you have to make these synchronisation changes like this. I much prefer such proposals to go at the end of my series, where I will probably nack them (and use rcu instead if the remaining trylocks are such a big issue).