summaryrefslogtreecommitdiffstats
path: root/mm/readahead.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-01-14 10:42:36 +0100
committerJens Axboe <axboe@fb.com>2015-01-20 14:03:04 -0700
commitde1414a654e66b81b5348dbc5259ecf2fb61655e (patch)
tree2b3d60d6c0dc87ba33caff3e326d5648831d6176 /mm/readahead.c
parent26ff13047e3dc6c0230a629867e8dbd4a15a7626 (diff)
downloadlinux-stable-de1414a654e66b81b5348dbc5259ecf2fb61655e.tar.gz
linux-stable-de1414a654e66b81b5348dbc5259ecf2fb61655e.tar.bz2
linux-stable-de1414a654e66b81b5348dbc5259ecf2fb61655e.zip
fs: export inode_to_bdi and use it in favor of mapping->backing_dev_info
Now that we got rid of the bdi abuse on character devices we can always use 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> Reviewed-by: Tejun Heo <tj@kernel.org> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'mm/readahead.c')
-rw-r--r--mm/readahead.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/readahead.c b/mm/readahead.c
index 17b9172ec37f..935675844b2e 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -27,7 +27,7 @@
void
file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping)
{
- ra->ra_pages = mapping->backing_dev_info->ra_pages;
+ ra->ra_pages = inode_to_bdi(mapping->host)->ra_pages;
ra->prev_pos = -1;
}
EXPORT_SYMBOL_GPL(file_ra_state_init);
@@ -541,7 +541,7 @@ page_cache_async_readahead(struct address_space *mapping,
/*
* Defer asynchronous read-ahead on IO congestion.
*/
- if (bdi_read_congested(mapping->backing_dev_info))
+ if (bdi_read_congested(inode_to_bdi(mapping->host)))
return;
/* do read-ahead */