mm: make pagevec_lookup() update index
Make pagevec_lookup() (and underlying find_get_pages()) update index to the next page where iteration should continue. Most callers want this and also pagevec_lookup_tag() already does this. Link: http://lkml.kernel.org/r/20170726114704.7626-3-jack@suse.cz Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
26b433d0da
commit
d72dc8a25a
11 changed files with 32 additions and 37 deletions
|
|
@ -353,7 +353,7 @@ struct page *find_lock_entry(struct address_space *mapping, pgoff_t offset);
|
|||
unsigned find_get_entries(struct address_space *mapping, pgoff_t start,
|
||||
unsigned int nr_entries, struct page **entries,
|
||||
pgoff_t *indices);
|
||||
unsigned find_get_pages(struct address_space *mapping, pgoff_t start,
|
||||
unsigned find_get_pages(struct address_space *mapping, pgoff_t *start,
|
||||
unsigned int nr_pages, struct page **pages);
|
||||
unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start,
|
||||
unsigned int nr_pages, struct page **pages);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ unsigned pagevec_lookup_entries(struct pagevec *pvec,
|
|||
pgoff_t *indices);
|
||||
void pagevec_remove_exceptionals(struct pagevec *pvec);
|
||||
unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping,
|
||||
pgoff_t start, unsigned nr_pages);
|
||||
pgoff_t *start, unsigned nr_pages);
|
||||
unsigned pagevec_lookup_tag(struct pagevec *pvec,
|
||||
struct address_space *mapping, pgoff_t *index, int tag,
|
||||
unsigned nr_pages);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue