提交 495a276e 编写于 作者: C Christoph Hellwig 提交者: Jens Axboe

block_dev: get bdev inode bdi directly from the block device

Directly grab the backing_dev_info from the request_queue instead of
detouring through the address_space.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NTejun Heo <tj@kernel.org>
Reviewed-by: NJan Kara <jack@suse.cz>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 564f00f6
......@@ -69,10 +69,10 @@ EXPORT_SYMBOL(writeback_in_progress);
static inline struct backing_dev_info *inode_to_bdi(struct inode *inode)
{
struct super_block *sb = inode->i_sb;
#ifdef CONFIG_BLOCK
if (sb_is_blkdev_sb(sb))
return inode->i_mapping->backing_dev_info;
return blk_get_backing_dev_info(I_BDEV(inode));
#endif
return sb->s_bdi;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册