diff options
Diffstat (limited to 'include/linux/pagemap.h')
| -rw-r--r-- | include/linux/pagemap.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 64f950925151..c3e255bf8594 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
| @@ -52,19 +52,23 @@ static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask) | |||
| 52 | void release_pages(struct page **pages, int nr, int cold); | 52 | void release_pages(struct page **pages, int nr, int cold); |
| 53 | 53 | ||
| 54 | #ifdef CONFIG_NUMA | 54 | #ifdef CONFIG_NUMA |
| 55 | extern struct page *page_cache_alloc(struct address_space *x); | 55 | extern struct page *__page_cache_alloc(gfp_t gfp); |
| 56 | extern struct page *page_cache_alloc_cold(struct address_space *x); | ||
| 57 | #else | 56 | #else |
| 57 | static inline struct page *__page_cache_alloc(gfp_t gfp) | ||
| 58 | { | ||
| 59 | return alloc_pages(gfp, 0); | ||
| 60 | } | ||
| 61 | #endif | ||
| 62 | |||
| 58 | static inline struct page *page_cache_alloc(struct address_space *x) | 63 | static inline struct page *page_cache_alloc(struct address_space *x) |
| 59 | { | 64 | { |
| 60 | return alloc_pages(mapping_gfp_mask(x), 0); | 65 | return __page_cache_alloc(mapping_gfp_mask(x)); |
| 61 | } | 66 | } |
| 62 | 67 | ||
| 63 | static inline struct page *page_cache_alloc_cold(struct address_space *x) | 68 | static inline struct page *page_cache_alloc_cold(struct address_space *x) |
| 64 | { | 69 | { |
| 65 | return alloc_pages(mapping_gfp_mask(x)|__GFP_COLD, 0); | 70 | return __page_cache_alloc(mapping_gfp_mask(x)|__GFP_COLD); |
| 66 | } | 71 | } |
| 67 | #endif | ||
| 68 | 72 | ||
| 69 | typedef int filler_t(void *, struct page *); | 73 | typedef int filler_t(void *, struct page *); |
| 70 | 74 | ||
