[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20170224170606.GR6515@twins.programming.kicks-ass.net>
Date: Fri, 24 Feb 2017 18:06:06 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Hans Liljestrand <ishkamiel@...il.com>,
Al Viro <viro@...iv.linux.org.uk>,
linux-kernel@...r.kernel.org, dwindsor@...il.com,
David Howells <dhowells@...hat.com>,
linux-fsdevel@...r.kernel.org, Chris Mason <clm@...com>,
gregkh@...uxfoundation.org, elena.reshetova@...el.com
Subject: Re: [RFC][PATCH 02/10] fs: Avoid looking at i_count without i_lock
held
On Fri, Feb 24, 2017 at 08:56:06AM -0800, Linus Torvalds wrote:
> This one looks very questionable.
>
> Taking the lock for every single inode, even when we can tell that it's
> pointless, is horrid.
>
> Even if you really think you found a race, i think it would be better to
> leave the unlocked read around as an optimistic check, and then do a safe
> double check read inside the lock (together with the i_state checks)
>
> Hmm?
Yeah, pretty dumb that.
Powered by blists - more mailing lists