aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/page-flags.h5
-rw-r--r--mm/page_alloc.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 731cd2ac3227..709d92fd2877 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -83,6 +83,7 @@
83#define PG_private 11 /* If pagecache, has fs-private data */ 83#define PG_private 11 /* If pagecache, has fs-private data */
84 84
85#define PG_writeback 12 /* Page is under writeback */ 85#define PG_writeback 12 /* Page is under writeback */
86#define PG_readahead 13 /* Reminder to do async read-ahead */
86#define PG_compound 14 /* Part of a compound page */ 87#define PG_compound 14 /* Part of a compound page */
87#define PG_swapcache 15 /* Swap page: swp_entry_t in private */ 88#define PG_swapcache 15 /* Swap page: swp_entry_t in private */
88 89
@@ -226,6 +227,10 @@ static inline void SetPageUptodate(struct page *page)
226#define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) 227#define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags)
227#define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags) 228#define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags)
228 229
230#define PageReadahead(page) test_bit(PG_readahead, &(page)->flags)
231#define SetPageReadahead(page) set_bit(PG_readahead, &(page)->flags)
232#define ClearPageReadahead(page) clear_bit(PG_readahead, &(page)->flags)
233
229#define PageReclaim(page) test_bit(PG_reclaim, &(page)->flags) 234#define PageReclaim(page) test_bit(PG_reclaim, &(page)->flags)
230#define SetPageReclaim(page) set_bit(PG_reclaim, &(page)->flags) 235#define SetPageReclaim(page) set_bit(PG_reclaim, &(page)->flags)
231#define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags) 236#define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e2a10b957f23..2165be9462c0 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -617,7 +617,7 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
617 if (PageReserved(page)) 617 if (PageReserved(page))
618 return 1; 618 return 1;
619 619
620 page->flags &= ~(1 << PG_uptodate | 1 << PG_error | 620 page->flags &= ~(1 << PG_uptodate | 1 << PG_error | 1 << PG_readahead |
621 1 << PG_referenced | 1 << PG_arch_1 | 621 1 << PG_referenced | 1 << PG_arch_1 |
622 1 << PG_owner_priv_1 | 1 << PG_mappedtodisk); 622 1 << PG_owner_priv_1 | 1 << PG_mappedtodisk);
623 set_page_private(page, 0); 623 set_page_private(page, 0);