diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-04-07 22:18:55 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2021-04-23 10:25:00 +0200 |
commit | fcd9ae4f7f3b5fbd549285bab0478a339113620e (patch) | |
tree | 4a188d6754431b22be1913cf13841ca4d808bc87 /mm/internal.h | |
parent | mm: Add set/end/wait functions for PG_private_2 (diff) | |
download | linux-fcd9ae4f7f3b5fbd549285bab0478a339113620e.tar.xz linux-fcd9ae4f7f3b5fbd549285bab0478a339113620e.zip |
mm/filemap: Pass the file_ra_state in the ractl
For readahead_expand(), we need to modify the file ra_state, so pass it
down by adding it to the ractl. We have to do this because it's not always
the same as f_ra in the struct file that is already being passed.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Jeff Layton <jlayton@kernel.org>
Tested-by: Dave Wysochanski <dwysocha@redhat.com>
Tested-By: Marc Dionne <marc.dionne@auristor.com>
Link: https://lore.kernel.org/r/20210407201857.3582797-2-willy@infradead.org/
Link: https://lore.kernel.org/r/161789067431.6155.8063840447229665720.stgit@warthog.procyon.org.uk/ # v6
Diffstat (limited to 'mm/internal.h')
-rw-r--r-- | mm/internal.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/internal.h b/mm/internal.h index 1432feec62df..83a07b2a7b1f 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -51,13 +51,12 @@ void unmap_page_range(struct mmu_gather *tlb, void do_page_cache_ra(struct readahead_control *, unsigned long nr_to_read, unsigned long lookahead_size); -void force_page_cache_ra(struct readahead_control *, struct file_ra_state *, - unsigned long nr); +void force_page_cache_ra(struct readahead_control *, unsigned long nr); static inline void force_page_cache_readahead(struct address_space *mapping, struct file *file, pgoff_t index, unsigned long nr_to_read) { - DEFINE_READAHEAD(ractl, file, mapping, index); - force_page_cache_ra(&ractl, &file->f_ra, nr_to_read); + DEFINE_READAHEAD(ractl, file, &file->f_ra, mapping, index); + force_page_cache_ra(&ractl, nr_to_read); } unsigned find_lock_entries(struct address_space *mapping, pgoff_t start, |