From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodore Ts'o Subject: Re: help with understanding evict inode functionality Date: Sun, 4 Oct 2015 18:37:01 -0400 Message-ID: <20151004223701.GC4442@thunk.org> References: <560E8D36.7010803@paragon-software.com> <788B0E19-4D87-4221-BB69-408E930A0227@netapp.com> <20151004022802.GB4442@thunk.org> <20151004060136.GA19017@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Kornievskaia, Olga" , Leonid Fedorenchik , "linux-fsdevel@vger.kernel.org" To: Christoph Hellwig Return-path: Received: from imap.thunk.org ([74.207.234.97]:59434 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbbJDWhi (ORCPT ); Sun, 4 Oct 2015 18:37:38 -0400 Content-Disposition: inline In-Reply-To: <20151004060136.GA19017@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Oct 03, 2015 at 11:01:36PM -0700, Christoph Hellwig wrote: > > That's not true. Evict is called when we want to remove an inode > from memory. i_count needs to be zero for that, but i_nlink doesn't > as we don't cache inodes forever. When we drop i_count and it reaches > zero iput_final() is called, which decides depending on ->drop_inode > to either evict the inode or keep it on the LRU. Sorry, of course Cristoph is absolutely correct. - Ted