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

From: Christoph Hellwig
Date: Wed Jun 03 2009 - 11:57:23 EST


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..

> +/*
> + * 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.

--
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/