summaryrefslogtreecommitdiffstats
path: root/mm/internal.h
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2020-10-16 05:06:17 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2020-10-16 20:11:16 +0200
commit8238287eadb2ddaedd920ba06021c33ec36d0320 (patch)
tree97bd45827bec1eba9d3e462d1cd1f592472139fb /mm/internal.h
parentmm/readahead: make page_cache_ra_unbounded take a readahead_control (diff)
downloadlinux-8238287eadb2ddaedd920ba06021c33ec36d0320.tar.xz
linux-8238287eadb2ddaedd920ba06021c33ec36d0320.zip
mm/readahead: make do_page_cache_ra take a readahead_control
Rename __do_page_cache_readahead() to do_page_cache_ra() and call it directly from ondemand_readahead() instead of indirecting via ra_submit(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: David Howells <dhowells@redhat.com> Cc: Eric Biggers <ebiggers@google.com> Link: https://lkml.kernel.org/r/20200903140844.14194-5-willy@infradead.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/internal.h')
-rw-r--r--mm/internal.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/mm/internal.h b/mm/internal.h
index a801a4d51f26..41ade6c184ec 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -51,18 +51,17 @@ void unmap_page_range(struct mmu_gather *tlb,
void force_page_cache_readahead(struct address_space *, struct file *,
pgoff_t index, unsigned long nr_to_read);
-void __do_page_cache_readahead(struct address_space *, struct file *,
- pgoff_t index, unsigned long nr_to_read,
- unsigned long lookahead_size);
+void do_page_cache_ra(struct readahead_control *,
+ unsigned long nr_to_read, unsigned long lookahead_size);
/*
* Submit IO for the read-ahead request in file_ra_state.
*/
static inline void ra_submit(struct file_ra_state *ra,
- struct address_space *mapping, struct file *filp)
+ struct address_space *mapping, struct file *file)
{
- __do_page_cache_readahead(mapping, filp,
- ra->start, ra->size, ra->async_size);
+ DEFINE_READAHEAD(ractl, file, mapping, ra->start);
+ do_page_cache_ra(&ractl, ra->size, ra->async_size);
}
struct page *find_get_entry(struct address_space *mapping, pgoff_t index);