aboutsummaryrefslogtreecommitdiffstats
path: root/mm/readahead.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-01-14 04:42:36 -0500
committerJens Axboe <axboe@fb.com>2015-01-20 16:03:04 -0500
commitde1414a654e66b81b5348dbc5259ecf2fb61655e (patch)
tree2b3d60d6c0dc87ba33caff3e326d5648831d6176 /mm/readahead.c
parent26ff13047e3dc6c0230a629867e8dbd4a15a7626 (diff)
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 @@
27void 27void
28file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping) 28file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping)
29{ 29{
30 ra->ra_pages = mapping->backing_dev_info->ra_pages; 30 ra->ra_pages = inode_to_bdi(mapping->host)->ra_pages;
31 ra->prev_pos = -1; 31 ra->prev_pos = -1;
32} 32}
33EXPORT_SYMBOL_GPL(file_ra_state_init); 33EXPORT_SYMBOL_GPL(file_ra_state_init);
@@ -541,7 +541,7 @@ page_cache_async_readahead(struct address_space *mapping,
541 /* 541 /*
542 * Defer asynchronous read-ahead on IO congestion. 542 * Defer asynchronous read-ahead on IO congestion.
543 */ 543 */
544 if (bdi_read_congested(mapping->backing_dev_info)) 544 if (bdi_read_congested(inode_to_bdi(mapping->host)))
545 return; 545 return;
546 546
547 /* do read-ahead */ 547 /* do read-ahead */