Commit 495a276e authored by Christoph Hellwig's avatar Christoph Hellwig Committed by 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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarTejun Heo <tj@kernel.org>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment