Re: [PATCH] vfs: Split generic_forget_inode() so that hugetlbfsdoes not have to copy it

From: Jan Kara
Date: Wed Jun 03 2009 - 18:13:20 EST


On Wed 03-06-09 11:56:38, Christoph Hellwig wrote:
> On Tue, Jun 02, 2009 at 06:20:34PM +0200, Jan Kara wrote:
> > Hugetlbfs needs to do special things instead of truncate_inode_pages().
> > Currently, it copied generic_forget_inode() except for truncate_inode_pages()
> > call which is asking for trouble (the code there isn't trivial). So create a
> > separate function generic_detach_inode() which does all the list magic done in
> > generic_forget_inode() and call it from hugetlbfs_forget_inode().
>
> Looks good to me, but long term I'd just prefer to have
> truncate_inode_pages do the right thing for huge pages..
That would be nice but I don't know how to do that (being completely
ignorant of hugepages ;).

> > +/*
> > + * Remove inode from inode lists, write it if it's dirty.
> > + *
> > + * Returns 1 if inode should be completely destroyed.
> > + */
>
> Please make this a kerneldoc comment. And mention that this is just
> and internal helper that can go away any time.
Fixed. Resulting patch below...

--
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
---