Re: [PATCH 17/17] fs: Clean up inode reference counting

From: Andrew Morton
Date: Thu Sep 30 2010 - 00:52:34 EST


On Wed, 29 Sep 2010 22:18:49 +1000 Dave Chinner <david@xxxxxxxxxxxxx> wrote:

> -static inline void __iget(struct inode *inode)
> +static inline void iget_ilock(struct inode *inode)
> {
> assert_spin_locked(&inode->i_lock);
> + BUG_ON(inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE));
> inode->i_count++;
> }
>
> +static inline void iget(struct inode *inode)
> +{
> + spin_lock(&inode->i_lock);
> + iget_ilock(inode);
> + spin_unlock(&inode->i_lock);
> +}

I suspect that for typical configs, these functions will generate amazing
amounts of code.

Please measure this. We may decide to uninline both.

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