diff options
Diffstat (limited to 'include/linux/pagemap.h')
-rw-r--r-- | include/linux/pagemap.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index e08b5339023c..34ce3ebf97d5 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/hardirq.h> /* for in_interrupt() */ | 16 | #include <linux/hardirq.h> /* for in_interrupt() */ |
17 | #include <linux/hugetlb_inline.h> | 17 | #include <linux/hugetlb_inline.h> |
18 | 18 | ||
19 | struct pagevec; | ||
20 | |||
19 | /* | 21 | /* |
20 | * Bits in mapping->flags. | 22 | * Bits in mapping->flags. |
21 | */ | 23 | */ |
@@ -116,7 +118,7 @@ static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask) | |||
116 | m->gfp_mask = mask; | 118 | m->gfp_mask = mask; |
117 | } | 119 | } |
118 | 120 | ||
119 | void release_pages(struct page **pages, int nr, bool cold); | 121 | void release_pages(struct page **pages, int nr); |
120 | 122 | ||
121 | /* | 123 | /* |
122 | * speculatively take a reference to a page. | 124 | * speculatively take a reference to a page. |
@@ -232,15 +234,9 @@ static inline struct page *page_cache_alloc(struct address_space *x) | |||
232 | return __page_cache_alloc(mapping_gfp_mask(x)); | 234 | return __page_cache_alloc(mapping_gfp_mask(x)); |
233 | } | 235 | } |
234 | 236 | ||
235 | static inline struct page *page_cache_alloc_cold(struct address_space *x) | ||
236 | { | ||
237 | return __page_cache_alloc(mapping_gfp_mask(x)|__GFP_COLD); | ||
238 | } | ||
239 | |||
240 | static inline gfp_t readahead_gfp_mask(struct address_space *x) | 237 | static inline gfp_t readahead_gfp_mask(struct address_space *x) |
241 | { | 238 | { |
242 | return mapping_gfp_mask(x) | | 239 | return mapping_gfp_mask(x) | __GFP_NORETRY | __GFP_NOWARN; |
243 | __GFP_COLD | __GFP_NORETRY | __GFP_NOWARN; | ||
244 | } | 240 | } |
245 | 241 | ||
246 | typedef int filler_t(void *, struct page *); | 242 | typedef int filler_t(void *, struct page *); |
@@ -366,8 +362,16 @@ static inline unsigned find_get_pages(struct address_space *mapping, | |||
366 | } | 362 | } |
367 | unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start, | 363 | unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start, |
368 | unsigned int nr_pages, struct page **pages); | 364 | unsigned int nr_pages, struct page **pages); |
369 | unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, | 365 | unsigned find_get_pages_range_tag(struct address_space *mapping, pgoff_t *index, |
370 | int tag, unsigned int nr_pages, struct page **pages); | 366 | pgoff_t end, int tag, unsigned int nr_pages, |
367 | struct page **pages); | ||
368 | static inline unsigned find_get_pages_tag(struct address_space *mapping, | ||
369 | pgoff_t *index, int tag, unsigned int nr_pages, | ||
370 | struct page **pages) | ||
371 | { | ||
372 | return find_get_pages_range_tag(mapping, index, (pgoff_t)-1, tag, | ||
373 | nr_pages, pages); | ||
374 | } | ||
371 | unsigned find_get_entries_tag(struct address_space *mapping, pgoff_t start, | 375 | unsigned find_get_entries_tag(struct address_space *mapping, pgoff_t start, |
372 | int tag, unsigned int nr_entries, | 376 | int tag, unsigned int nr_entries, |
373 | struct page **entries, pgoff_t *indices); | 377 | struct page **entries, pgoff_t *indices); |
@@ -616,6 +620,8 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping, | |||
616 | extern void delete_from_page_cache(struct page *page); | 620 | extern void delete_from_page_cache(struct page *page); |
617 | extern void __delete_from_page_cache(struct page *page, void *shadow); | 621 | extern void __delete_from_page_cache(struct page *page, void *shadow); |
618 | int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask); | 622 | int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask); |
623 | void delete_from_page_cache_batch(struct address_space *mapping, | ||
624 | struct pagevec *pvec); | ||
619 | 625 | ||
620 | /* | 626 | /* |
621 | * Like add_to_page_cache_locked, but used to add newly allocated pages: | 627 | * Like add_to_page_cache_locked, but used to add newly allocated pages: |