mm: add variant of pagevec_lookup_range_tag() taking number of pages
[sfrench/cifs-2.6.git] / include / linux / pagevec.h
index 2636c0c0f279333959f2155adc4995d527257f9d..87a2dfd62f5e397b36550c04090d2e104dd6fdc2 100644 (file)
@@ -38,9 +38,19 @@ static inline unsigned pagevec_lookup(struct pagevec *pvec,
        return pagevec_lookup_range(pvec, mapping, start, (pgoff_t)-1);
 }
 
-unsigned pagevec_lookup_tag(struct pagevec *pvec,
+unsigned pagevec_lookup_range_tag(struct pagevec *pvec,
+               struct address_space *mapping, pgoff_t *index, pgoff_t end,
+               int tag, unsigned nr_pages);
+unsigned pagevec_lookup_range_nr_tag(struct pagevec *pvec,
+               struct address_space *mapping, pgoff_t *index, pgoff_t end,
+               int tag, unsigned max_pages);
+static inline unsigned pagevec_lookup_tag(struct pagevec *pvec,
                struct address_space *mapping, pgoff_t *index, int tag,
-               unsigned nr_pages);
+               unsigned nr_pages)
+{
+       return pagevec_lookup_range_tag(pvec, mapping, index, (pgoff_t)-1, tag,
+                                       nr_pages);
+}
 
 static inline void pagevec_init(struct pagevec *pvec, int cold)
 {