diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-05-27 19:30:54 +0300 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-01-04 21:15:34 +0300 |
commit | 7836d9990079ed611199819ccf487061b748193a (patch) | |
tree | 0ba00c8059d09d3b3311bd1373cde228241e827d /mm/readahead.c | |
parent | 2fa4eeb800c0f8279f396abde010360f48b4b1d4 (diff) | |
download | linux-7836d9990079ed611199819ccf487061b748193a.tar.xz |
readahead: Convert page_cache_async_ra() to take a folio
Using the folio here avoids checking whether it's a tail page.
This patch mostly just enables some of the following patches.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Diffstat (limited to 'mm/readahead.c')
-rw-r--r-- | mm/readahead.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/readahead.c b/mm/readahead.c index 6ae5693de28c..e48e78641772 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -581,7 +581,7 @@ void page_cache_sync_ra(struct readahead_control *ractl, EXPORT_SYMBOL_GPL(page_cache_sync_ra); void page_cache_async_ra(struct readahead_control *ractl, - struct page *page, unsigned long req_count) + struct folio *folio, unsigned long req_count) { /* no read-ahead */ if (!ractl->ra->ra_pages) @@ -590,10 +590,10 @@ void page_cache_async_ra(struct readahead_control *ractl, /* * Same bit is used for PG_readahead and PG_reclaim. */ - if (PageWriteback(page)) + if (folio_test_writeback(folio)) return; - ClearPageReadahead(page); + folio_clear_readahead(folio); /* * Defer asynchronous read-ahead on IO congestion. |