diff options
Diffstat (limited to 'include/linux/pagemap.h')
-rw-r--r-- | include/linux/pagemap.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index c11950652646..716875e53520 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -219,6 +219,12 @@ static inline struct page *page_cache_alloc_cold(struct address_space *x) | |||
219 | return __page_cache_alloc(mapping_gfp_mask(x)|__GFP_COLD); | 219 | return __page_cache_alloc(mapping_gfp_mask(x)|__GFP_COLD); |
220 | } | 220 | } |
221 | 221 | ||
222 | static inline struct page *page_cache_alloc_readahead(struct address_space *x) | ||
223 | { | ||
224 | return __page_cache_alloc(mapping_gfp_mask(x) | | ||
225 | __GFP_COLD | __GFP_NORETRY | __GFP_NOWARN); | ||
226 | } | ||
227 | |||
222 | typedef int filler_t(void *, struct page *); | 228 | typedef int filler_t(void *, struct page *); |
223 | 229 | ||
224 | extern struct page * find_get_page(struct address_space *mapping, | 230 | extern struct page * find_get_page(struct address_space *mapping, |
@@ -357,6 +363,15 @@ static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm, | |||
357 | */ | 363 | */ |
358 | extern void wait_on_page_bit(struct page *page, int bit_nr); | 364 | extern void wait_on_page_bit(struct page *page, int bit_nr); |
359 | 365 | ||
366 | extern int wait_on_page_bit_killable(struct page *page, int bit_nr); | ||
367 | |||
368 | static inline int wait_on_page_locked_killable(struct page *page) | ||
369 | { | ||
370 | if (PageLocked(page)) | ||
371 | return wait_on_page_bit_killable(page, PG_locked); | ||
372 | return 0; | ||
373 | } | ||
374 | |||
360 | /* | 375 | /* |
361 | * Wait for a page to be unlocked. | 376 | * Wait for a page to be unlocked. |
362 | * | 377 | * |