aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/page_alloc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 418102a02921..62b950901d6f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -105,11 +105,13 @@ static void bad_page(const char *function, struct page *page)
105 printk(KERN_EMERG "Backtrace:\n"); 105 printk(KERN_EMERG "Backtrace:\n");
106 dump_stack(); 106 dump_stack();
107 printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n"); 107 printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n");
108 page->flags &= ~(1 << PG_private | 108 page->flags &= ~(1 << PG_lru |
109 1 << PG_private |
109 1 << PG_locked | 110 1 << PG_locked |
110 1 << PG_lru |
111 1 << PG_active | 111 1 << PG_active |
112 1 << PG_dirty | 112 1 << PG_dirty |
113 1 << PG_reclaim |
114 1 << PG_slab |
113 1 << PG_swapcache | 115 1 << PG_swapcache |
114 1 << PG_writeback); 116 1 << PG_writeback);
115 set_page_count(page, 0); 117 set_page_count(page, 0);
@@ -440,14 +442,17 @@ void set_page_refs(struct page *page, int order)
440 */ 442 */
441static void prep_new_page(struct page *page, int order) 443static void prep_new_page(struct page *page, int order)
442{ 444{
443 if (page->mapping || page_mapcount(page) || 445 if ( page_mapcount(page) ||
444 (page->flags & ( 446 page->mapping != NULL ||
447 page_count(page) != 0 ||
448 (page->flags & (
449 1 << PG_lru |
445 1 << PG_private | 450 1 << PG_private |
446 1 << PG_locked | 451 1 << PG_locked |
447 1 << PG_lru |
448 1 << PG_active | 452 1 << PG_active |
449 1 << PG_dirty | 453 1 << PG_dirty |
450 1 << PG_reclaim | 454 1 << PG_reclaim |
455 1 << PG_slab |
451 1 << PG_swapcache | 456 1 << PG_swapcache |
452 1 << PG_writeback ))) 457 1 << PG_writeback )))
453 bad_page(__FUNCTION__, page); 458 bad_page(__FUNCTION__, page);