From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Lameter Subject: Re: SLUB defrag pull request? Date: Mon, 13 Oct 2008 09:35:18 -0700 Message-ID: <48F378C6.7030206@linux-foundation.org> References: <1223883004.31587.15.camel@penberg-laptop> <1223883164.31587.16.camel@penberg-laptop> <200810132354.30789.nickpiggin@yahoo.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: penberg@cs.helsinki.fi, nickpiggin@yahoo.com.au, hugh@veritas.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org To: Miklos Szeredi Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:48535 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754519AbYJMOfz (ORCPT ); Mon, 13 Oct 2008 10:35:55 -0400 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Miklos Szeredi wrote: > And the things kick_inodes() does without any sort of locking look > even more dangerous. > > It should be the other way round: first make sure nothing is > referencing the inode, and _then_ start cleaning it up with > appropriate locks held. See prune_icache(). > > kick_inodes() only works on inodes that first have undergone get_inodes() where we establish a refcount under inode_lock(). The final cleanup in kick_inodes() is done under iprune_mutex. You are looking at the loop that does writeback and invalidates attached dentries. This can fail for various reasons.