mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
mm/readahead: Convert page_cache_async_readahead to take a folio
Removes a couple of calls to compound_head and saves a few bytes. Also convert verity's read_file_data_page() to be folio-based. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -1242,7 +1242,7 @@ void page_cache_sync_readahead(struct address_space *mapping,
|
||||
* @mapping: address_space which holds the pagecache and I/O vectors
|
||||
* @ra: file_ra_state which holds the readahead state
|
||||
* @file: Used by the filesystem for authentication.
|
||||
* @page: The page at @index which triggered the readahead call.
|
||||
* @folio: The folio at @index which triggered the readahead call.
|
||||
* @index: Index of first page to be read.
|
||||
* @req_count: Total number of pages being read by the caller.
|
||||
*
|
||||
@@ -1254,10 +1254,10 @@ void page_cache_sync_readahead(struct address_space *mapping,
|
||||
static inline
|
||||
void page_cache_async_readahead(struct address_space *mapping,
|
||||
struct file_ra_state *ra, struct file *file,
|
||||
struct page *page, pgoff_t index, unsigned long req_count)
|
||||
struct folio *folio, pgoff_t index, unsigned long req_count)
|
||||
{
|
||||
DEFINE_READAHEAD(ractl, file, ra, mapping, index);
|
||||
page_cache_async_ra(&ractl, page_folio(page), req_count);
|
||||
page_cache_async_ra(&ractl, folio, req_count);
|
||||
}
|
||||
|
||||
static inline struct folio *__readahead_folio(struct readahead_control *ractl)
|
||||
|
Reference in New Issue
Block a user