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>
This commit is contained in:

committed by
Linus Torvalds

parent
73bb49da50
commit
8238287ead
@@ -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);
|
||||
|
Reference in New Issue
Block a user