diff options
author | Christoph Hellwig <hch@lst.de> | 2015-01-14 12:42:34 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-01-21 00:03:01 +0300 |
commit | 495a276e1ca96af622edb67ad0f85431935b20d2 (patch) | |
tree | 6ff49a955028c9b1f61c722cbbc38976448d8056 | |
parent | 564f00f6c03a9339c259eb71a5b3aa8ef7ff1c2e (diff) | |
download | linux-495a276e1ca96af622edb67ad0f85431935b20d2.tar.xz |
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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | fs/fs-writeback.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 2d609a5fbfea..e8116a44cc29 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -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; } |