From 54262b4a51854ed140f14b8ad3429e8510a468a2 Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Tue, 24 May 2011 17:12:25 -0700 Subject: [PATCH] --- yaml --- r: 250912 b: refs/heads/master c: 7b1de5868b124d8f399d8791ed30a9b679d64d4d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/pagemap.h | 6 ++++++ trunk/mm/readahead.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index c8c91f3d3f4f..ccb98a0c074f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6d3163ce86dd386b4f7bda80241d7fea2bc0bb1d +refs/heads/master: 7b1de5868b124d8f399d8791ed30a9b679d64d4d diff --git a/trunk/include/linux/pagemap.h b/trunk/include/linux/pagemap.h index ea268080380d..716875e53520 100644 --- a/trunk/include/linux/pagemap.h +++ b/trunk/include/linux/pagemap.h @@ -219,6 +219,12 @@ static inline struct page *page_cache_alloc_cold(struct address_space *x) return __page_cache_alloc(mapping_gfp_mask(x)|__GFP_COLD); } +static inline struct page *page_cache_alloc_readahead(struct address_space *x) +{ + return __page_cache_alloc(mapping_gfp_mask(x) | + __GFP_COLD | __GFP_NORETRY | __GFP_NOWARN); +} + typedef int filler_t(void *, struct page *); extern struct page * find_get_page(struct address_space *mapping, diff --git a/trunk/mm/readahead.c b/trunk/mm/readahead.c index 2c0cc489e288..867f9dd82dcd 100644 --- a/trunk/mm/readahead.c +++ b/trunk/mm/readahead.c @@ -180,7 +180,7 @@ __do_page_cache_readahead(struct address_space *mapping, struct file *filp, if (page) continue; - page = page_cache_alloc_cold(mapping); + page = page_cache_alloc_readahead(mapping); if (!page) break; page->index = page_offset;