diff options
author | Russ Anderson <rja@sgi.com> | 2008-06-09 12:18:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-09 13:22:24 -0400 |
commit | dfa7e20cc0d1a7a620def4dce97de1ae5375f99b (patch) | |
tree | 0e197e502fc884e9de2bc49d3d9cdbee9e7bc3c4 /mm | |
parent | d5791d13b1d45542895104edf4b09476d5ad24b0 (diff) |
mm: Minor clean-up of page flags in mm/page_alloc.c
Minor source code cleanup of page flags in mm/page_alloc.c.
Move the definition of the groups of bits to page-flags.h.
The purpose of this clean up is that the next patch will
conditionally add a page flag to the groups. Doing that
in a header file is cleaner than adding #ifdefs to the
C code.
Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8e83f02cd2d3..2f552955a02f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -237,16 +237,7 @@ static void bad_page(struct page *page) | |||
237 | printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n" | 237 | printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n" |
238 | KERN_EMERG "Backtrace:\n"); | 238 | KERN_EMERG "Backtrace:\n"); |
239 | dump_stack(); | 239 | dump_stack(); |
240 | page->flags &= ~(1 << PG_lru | | 240 | page->flags &= ~PAGE_FLAGS_CLEAR_WHEN_BAD; |
241 | 1 << PG_private | | ||
242 | 1 << PG_locked | | ||
243 | 1 << PG_active | | ||
244 | 1 << PG_dirty | | ||
245 | 1 << PG_reclaim | | ||
246 | 1 << PG_slab | | ||
247 | 1 << PG_swapcache | | ||
248 | 1 << PG_writeback | | ||
249 | 1 << PG_buddy ); | ||
250 | set_page_count(page, 0); | 241 | set_page_count(page, 0); |
251 | reset_page_mapcount(page); | 242 | reset_page_mapcount(page); |
252 | page->mapping = NULL; | 243 | page->mapping = NULL; |
@@ -463,16 +454,7 @@ static inline int free_pages_check(struct page *page) | |||
463 | (page->mapping != NULL) | | 454 | (page->mapping != NULL) | |
464 | (page_get_page_cgroup(page) != NULL) | | 455 | (page_get_page_cgroup(page) != NULL) | |
465 | (page_count(page) != 0) | | 456 | (page_count(page) != 0) | |
466 | (page->flags & ( | 457 | (page->flags & PAGE_FLAGS_CHECK_AT_FREE))) |
467 | 1 << PG_lru | | ||
468 | 1 << PG_private | | ||
469 | 1 << PG_locked | | ||
470 | 1 << PG_active | | ||
471 | 1 << PG_slab | | ||
472 | 1 << PG_swapcache | | ||
473 | 1 << PG_writeback | | ||
474 | 1 << PG_reserved | | ||
475 | 1 << PG_buddy )))) | ||
476 | bad_page(page); | 458 | bad_page(page); |
477 | if (PageDirty(page)) | 459 | if (PageDirty(page)) |
478 | __ClearPageDirty(page); | 460 | __ClearPageDirty(page); |
@@ -616,17 +598,7 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags) | |||
616 | (page->mapping != NULL) | | 598 | (page->mapping != NULL) | |
617 | (page_get_page_cgroup(page) != NULL) | | 599 | (page_get_page_cgroup(page) != NULL) | |
618 | (page_count(page) != 0) | | 600 | (page_count(page) != 0) | |
619 | (page->flags & ( | 601 | (page->flags & PAGE_FLAGS_CHECK_AT_PREP))) |
620 | 1 << PG_lru | | ||
621 | 1 << PG_private | | ||
622 | 1 << PG_locked | | ||
623 | 1 << PG_active | | ||
624 | 1 << PG_dirty | | ||
625 | 1 << PG_slab | | ||
626 | 1 << PG_swapcache | | ||
627 | 1 << PG_writeback | | ||
628 | 1 << PG_reserved | | ||
629 | 1 << PG_buddy )))) | ||
630 | bad_page(page); | 602 | bad_page(page); |
631 | 603 | ||
632 | /* | 604 | /* |