[PATCH 33/35] mm: Remove nr_entries argument from pagevec_lookup_entries{,_range}()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All users pass PAGEVEC_SIZE as the number of entries now. Remove the
argument.

Signed-off-by: Jan Kara <jack@xxxxxxx>
---
 include/linux/pagevec.h | 7 +++----
 mm/shmem.c              | 4 ++--
 mm/swap.c               | 6 ++----
 mm/truncate.c           | 8 ++++----
 4 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
index 93308689d6a7..f765fc5eca31 100644
--- a/include/linux/pagevec.h
+++ b/include/linux/pagevec.h
@@ -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,
diff --git a/mm/shmem.c b/mm/shmem.c
index e5ea044aae24..dd8144230ecf 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -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;
diff --git a/mm/swap.c b/mm/swap.c
index 88c7eb4e97db..1640bbb34e59 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -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);
 }
diff --git a/mm/truncate.c b/mm/truncate.c
index 31d5c5f3da30..d35531d83cb3 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -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];
 
-- 
2.12.3




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux