aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/page-flags.h4
-rw-r--r--mm/page-writeback.c1
-rw-r--r--mm/page_alloc.c7
-rw-r--r--mm/readahead.c6
4 files changed, 10 insertions, 8 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 709d92fd2877..a454176c3e30 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -83,7 +83,6 @@
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 */
87#define PG_compound 14 /* Part of a compound page */ 86#define PG_compound 14 /* Part of a compound page */
88#define PG_swapcache 15 /* Swap page: swp_entry_t in private */ 87#define PG_swapcache 15 /* Swap page: swp_entry_t in private */
89 88
@@ -91,6 +90,9 @@
91#define PG_reclaim 17 /* To be reclaimed asap */ 90#define PG_reclaim 17 /* To be reclaimed asap */
92#define PG_buddy 19 /* Page is free, on buddy lists */ 91#define PG_buddy 19 /* Page is free, on buddy lists */
93 92
93/* PG_readahead is only used for file reads; PG_reclaim is only for writes */
94#define PG_readahead PG_reclaim /* Reminder to do async read-ahead */
95
94/* PG_owner_priv_1 users should have descriptive aliases */ 96/* PG_owner_priv_1 users should have descriptive aliases */
95#define PG_checked PG_owner_priv_1 /* Used by some filesystems */ 97#define PG_checked PG_owner_priv_1 /* Used by some filesystems */
96#define PG_pinned PG_owner_priv_1 /* Xen pinned pagetable */ 98#define PG_pinned PG_owner_priv_1 /* Xen pinned pagetable */
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index e62482718012..51b3eb6ab445 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -920,6 +920,7 @@ int clear_page_dirty_for_io(struct page *page)
920 920
921 BUG_ON(!PageLocked(page)); 921 BUG_ON(!PageLocked(page));
922 922
923 ClearPageReclaim(page);
923 if (mapping && mapping_cap_account_dirty(mapping)) { 924 if (mapping && mapping_cap_account_dirty(mapping)) {
924 /* 925 /*
925 * Yes, Virginia, this is indeed insane. 926 * Yes, Virginia, this is indeed insane.
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2165be9462c0..43cb3b3e1679 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -453,12 +453,6 @@ static inline int free_pages_check(struct page *page)
453 1 << PG_reserved | 453 1 << PG_reserved |
454 1 << PG_buddy )))) 454 1 << PG_buddy ))))
455 bad_page(page); 455 bad_page(page);
456 /*
457 * PageReclaim == PageTail. It is only an error
458 * for PageReclaim to be set if PageCompound is clear.
459 */
460 if (unlikely(!PageCompound(page) && PageReclaim(page)))
461 bad_page(page);
462 if (PageDirty(page)) 456 if (PageDirty(page))
463 __ClearPageDirty(page); 457 __ClearPageDirty(page);
464 /* 458 /*
@@ -602,7 +596,6 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
602 1 << PG_locked | 596 1 << PG_locked |
603 1 << PG_active | 597 1 << PG_active |
604 1 << PG_dirty | 598 1 << PG_dirty |
605 1 << PG_reclaim |
606 1 << PG_slab | 599 1 << PG_slab |
607 1 << PG_swapcache | 600 1 << PG_swapcache |
608 1 << PG_writeback | 601 1 << PG_writeback |
diff --git a/mm/readahead.c b/mm/readahead.c
index 5b3c9b7d70fa..205a4a431516 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -448,6 +448,12 @@ page_cache_readahead_ondemand(struct address_space *mapping,
448 return 0; 448 return 0;
449 449
450 if (page) { 450 if (page) {
451 /*
452 * It can be PG_reclaim.
453 */
454 if (PageWriteback(page))
455 return 0;
456
451 ClearPageReadahead(page); 457 ClearPageReadahead(page);
452 458
453 /* 459 /*