@@ -2259,7 +2259,7 @@ static bool filemap_range_uptodate(struct kiocb *iocb,
static int filemap_update_page(struct kiocb *iocb,
struct address_space *mapping, struct iov_iter *iter,
- struct page *page, loff_t pos, loff_t count, bool first)
+ struct page *page, bool first)
{
int error = -EAGAIN;
@@ -2330,8 +2330,8 @@ static int filemap_readahead(struct kiocb *iocb, struct file *file,
{
if (iocb->ki_flags & IOCB_NOIO)
return -EAGAIN;
- page_cache_async_readahead(mapping, ra, filp, page,
- pg_index, last_index - pg_index);
+ page_cache_async_readahead(mapping, &file->f_ra, file, page,
+ page->index, last_index - page->index);
return 0;
}
@@ -2374,22 +2374,17 @@ static int filemap_get_pages(struct kiocb *iocb, struct iov_iter *iter,
got_pages:
if (nr_got > 0) {
struct page *page = pages[nr_got - 1];
- pgoff_t pg_index = page->index;
- loff_t pg_pos = max(iocb->ki_pos,
- (loff_t) pg_index << PAGE_SHIFT);
- loff_t pg_count = iocb->ki_pos + iter->count - pg_pos;
if (PageReadahead(page))
err = filemap_readahead(iocb, filp, mapping, page,
last_index);
if (!err && !PageUptodate(page))
err = filemap_update_page(iocb, mapping, iter, page,
- pg_pos, pg_count, nr_got == 1);
+ nr_got == 1);
if (err)
nr_got--;
}
-err:
if (likely(nr_got))
return nr_got;
if (err < 0)
The 'pos' and 'count' params are no longer used in filemap_update_page() Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- mm/filemap.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)