[RFC][PATCH 02/10] fs: Avoid looking at i_count without i_lock held

2017-02-24 Thread Peter Zijlstra
In general i_count will only stay 0 if we have i_lock held. I realize this is evict, so having MS_ACTIVE cleared might avoid the race against find_inode_fast() in other ways. Signed-off-by: Peter Zijlstra (Intel) --- fs/inode.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) ---

Re: [RFC][PATCH 02/10] fs: Avoid looking at i_count without i_lock held

2017-02-24 Thread Peter Zijlstra
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