Re: [PATCH 07/12] fs: export inode_to_bdi and use it in favor of mapping->backing_dev_info

Tejun Heo
2015-01-11T18:17:20Z

Hello,

On Thu, Jan 08, 2015 at 06:45:28PM +0100, Christoph Hellwig wrote:
> Now that we got ri of the bdi abuse on character devices we can always use
^^^
rid

> sb->s_bdi to get at the backing_dev_info for a file, except for the block
> device special case. Export inode_to_bdi and replace uses of
> mapping->backing_dev_info with it to prepare for the removal of
> mapping->backing_dev_info.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Ah, this is so much better. Thanks a lot for doing this. Just one
nit below.

> +struct backing_dev_info *inode_to_bdi(struct inode *inode)
> {
> struct super_block *sb = inode->i_sb;
> #ifdef CONFIG_BLOCK
> @@ -75,6 +75,7 @@ static inline struct backing_dev_info *inode_to_bdi(struct inode *inode)
> #endif
> return sb->s_bdi;
> }
> +EXPORT_SYMBOL_GPL(inode_to_bdi);

This is rather trivial. Maybe we wanna make this an inline function?

Reviewed-by: Tejun Heo <tj@kernel.org>

--
tejun