Re: [PATCH 16/17] fs: Convert nr_inodes to a per-cpu counter

From: Christoph Hellwig
Date: Sat Oct 02 2010 - 12:02:30 EST


On Wed, Sep 29, 2010 at 09:53:22PM -0700, Andrew Morton wrote:
> > +extern int get_nr_inodes(void);
> > +extern int get_nr_inodes_unused(void);
>
> These are pretty cruddy names. Unfotunately we don't really have a vfs
> or "inode" subsystem name to prefix them with.

We don't really need to export these anyway. We have two callers for
each of them, and both are in the form of:


/* approximate dirty inodes */
nr_dirty_inodes = get_nr_inodes() - get_nr_inodes_unused();
if (nr_dirty_inodes < 0)
nr_dirty_inodes = 0;

which means we should just have a properly documented
get_nr_dirty_inodes() helper, the rest can stay private to inode.c

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