Re: [patch 27/35] fs: icache split IO and LRU lists

From: Nick Piggin
Date: Tue Oct 19 2010 - 22:41:25 EST


On Tue, Oct 19, 2010 at 06:12:07PM +0200, Miklos Szeredi wrote:
> On Tue, 19 Oct 2010, npiggin@xxxxxxxx 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/