[PATCH 3/6] mm: make generic_file_buffered_read() use iocb read-ahead helpers
From: Jens Axboe
Date: Sun May 31 2020 - 22:26:34 EST
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
---
mm/filemap.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/mm/filemap.c b/mm/filemap.c
index abdd3f32c932..eea40b5894fb 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2053,17 +2053,16 @@ static ssize_t generic_file_buffered_read(struct kiocb *iocb,
page = find_get_page(mapping, index);
if (!page) {
- page_cache_sync_readahead(mapping,
- ra, filp,
- index, last_index - index);
+ __page_cache_sync_readahead(mapping, ra, iocb, index,
+ last_index - index);
page = find_get_page(mapping, index);
if (unlikely(page == NULL))
goto no_cached_page;
}
if (PageReadahead(page)) {
- page_cache_async_readahead(mapping,
- ra, filp, page,
- index, last_index - index);
+ __page_cache_async_readahead(mapping, ra, iocb, page,
+ index,
+ last_index - index);
}
if (!PageUptodate(page)) {
/*
--
2.26.2
--------------3ADB41F72EDDDE21CDE7CE18
Content-Type: text/x-patch; charset=UTF-8;
name="0002-mm-provide-read-ahead-helpers-that-take-a-struct-kio.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-mm-provide-read-ahead-helpers-that-take-a-struct-kio.pa";
filename*1="tch"