@@ -25,14 +25,13 @@ void __pagevec_lru_add(struct pagevec *pvec);
unsigned pagevec_lookup_entries_range(struct pagevec *pvec,
struct address_space *mapping,
pgoff_t *start, pgoff_t end,
- unsigned nr_entries, pgoff_t *indices);
+ pgoff_t *indices);
static inline unsigned pagevec_lookup_entries(struct pagevec *pvec,
struct address_space *mapping,
- pgoff_t *start, unsigned nr_entries,
- pgoff_t *indices)
+ pgoff_t *start, pgoff_t *indices)
{
return pagevec_lookup_entries_range(pvec, mapping, start, (pgoff_t)-1,
- nr_entries, indices);
+ indices);
}
void pagevec_remove_exceptionals(struct pagevec *pvec);
unsigned pagevec_lookup_range(struct pagevec *pvec,
@@ -769,7 +769,7 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend,
index = start;
while (index < end) {
if (!pagevec_lookup_entries_range(&pvec, mapping, &index,
- end - 1, PAGEVEC_SIZE, indices))
+ end - 1, indices))
break;
for (i = 0; i < pagevec_count(&pvec); i++) {
struct page *page = pvec.pages[i];
@@ -857,7 +857,7 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend,
cond_resched();
if (!pagevec_lookup_entries_range(&pvec, mapping, &index,
- end - 1, PAGEVEC_SIZE, indices)) {
+ end - 1, indices)) {
/* If all gone or hole-punch or unfalloc, we're done */
if (lookup_start == start || end != -1)
break;
@@ -894,7 +894,6 @@ EXPORT_SYMBOL(__pagevec_lru_add);
* @mapping: The address_space to search
* @start: The starting entry index
* @end: The final entry index (inclusive)
- * @nr_entries: The maximum number of entries
* @indices: The cache indices corresponding to the entries in @pvec
*
* pagevec_lookup_entries() will search for and return a group of up
@@ -911,10 +910,9 @@ EXPORT_SYMBOL(__pagevec_lru_add);
*/
unsigned pagevec_lookup_entries_range(struct pagevec *pvec,
struct address_space *mapping,
- pgoff_t *start, pgoff_t end, unsigned nr_pages,
- pgoff_t *indices)
+ pgoff_t *start, pgoff_t end, pgoff_t *indices)
{
- pvec->nr = find_get_entries_range(mapping, start, end, nr_pages,
+ pvec->nr = find_get_entries_range(mapping, start, end, PAGEVEC_SIZE,
pvec->pages, indices);
return pagevec_count(pvec);
}
@@ -290,7 +290,7 @@ void truncate_inode_pages_range(struct address_space *mapping,
pagevec_init(&pvec, 0);
index = start;
while (index < end && pagevec_lookup_entries_range(&pvec, mapping,
- &index, end - 1, PAGEVEC_SIZE, indices)) {
+ &index, end - 1, indices)) {
for (i = 0; i < pagevec_count(&pvec); i++) {
struct page *page = pvec.pages[i];
@@ -354,7 +354,7 @@ void truncate_inode_pages_range(struct address_space *mapping,
cond_resched();
if (!pagevec_lookup_entries_range(&pvec, mapping, &index,
- end - 1, PAGEVEC_SIZE, indices)) {
+ end - 1, indices)) {
/* If all gone from start onwards, we're done */
if (lookup_start == start)
break;
@@ -476,7 +476,7 @@ unsigned long invalidate_mapping_pages(struct address_space *mapping,
pagevec_init(&pvec, 0);
while (index <= end && pagevec_lookup_entries_range(&pvec, mapping,
- &index, end, PAGEVEC_SIZE, indices)) {
+ &index, end, indices)) {
for (i = 0; i < pagevec_count(&pvec); i++) {
struct page *page = pvec.pages[i];
@@ -601,7 +601,7 @@ int invalidate_inode_pages2_range(struct address_space *mapping,
pagevec_init(&pvec, 0);
index = start;
while (index <= end && pagevec_lookup_entries_range(&pvec, mapping,
- &index, end, PAGEVEC_SIZE, indices)) {
+ &index, end, indices)) {
for (i = 0; i < pagevec_count(&pvec); i++) {
struct page *page = pvec.pages[i];
All users pass PAGEVEC_SIZE as the number of entries now. Remove the argument. Signed-off-by: Jan Kara <jack@suse.cz> --- include/linux/pagevec.h | 7 +++---- mm/shmem.c | 4 ++-- mm/swap.c | 6 ++---- mm/truncate.c | 8 ++++---- 4 files changed, 11 insertions(+), 14 deletions(-)