diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-02-24 21:01:59 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-24 22:38:27 +0100 |
commit | cbd59c48ae2bcadc4a7599c29cf32fd3f9b78251 (patch) | |
tree | 45ac75da0bae30506e8efc8b6362f418c36a4a6d /mm/huge_memory.c | |
parent | mm/filemap: convert filemap_get_pages to take a pagevec (diff) | |
download | linux-cbd59c48ae2bcadc4a7599c29cf32fd3f9b78251.tar.xz linux-cbd59c48ae2bcadc4a7599c29cf32fd3f9b78251.zip |
mm/filemap: use head pages in generic_file_buffered_read
Add filemap_get_read_batch() which returns the head pages which represent
a contiguous array of bytes in the file. It also stops when encountering
a page marked as Readahead or !Uptodate (but does return that page) so it
can be handled appropriately by filemap_get_pages(). That lets us remove
the loop in filemap_get_pages() and check only the last page.
Link: https://lkml.kernel.org/r/20210122160140.223228-5-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Kent Overstreet <kent.overstreet@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
0 files changed, 0 insertions, 0 deletions