From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: [patch 27/35] fs: icache split IO and LRU lists Date: Wed, 20 Oct 2010 13:41:18 +1100 Message-ID: <20101020024118.GF3740@amd> References: <20101019034216.319085068@kernel.dk> <20101019034658.324078575@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: npiggin@kernel.dk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Miklos Szeredi Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Oct 19, 2010 at 06:12:07PM +0200, Miklos Szeredi wrote: > On Tue, 19 Oct 2010, npiggin@kernel.d wrote: > > @@ -422,7 +422,11 @@ > > /* > > * The inode is clean > > */ > > - list_move(&inode->i_list, &inode_unused); > > + list_del_init(&inode->i_io); > > + if (list_empty(&inode->i_lru)) { > > + list_add(&inode->i_lru, &inode_unused); > > + inodes_stat.nr_unused++; > > It's not obvious where this came from. How come nr_unused was > correctly accounted with the previous, list_move() version? Yes... inode is considered unused if it has 0 refcount, even if it is dirty. This hunk must have crept in from somewhere else, good catch. Thanks, Nick