diff options
author | Nick Piggin <npiggin@suse.de> | 2006-03-22 03:08:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 10:54:02 -0500 |
commit | 7835e98b2e3c66dba79cb0ff8ebb90a2fe030c29 (patch) | |
tree | 405a96eade34845dabe2f125b6c5eb095846869d /arch/x86_64/mm | |
parent | 70dc991d66cac40fdb07346dba2b5d862d732c34 (diff) |
[PATCH] remove set_page_count() outside mm/
set_page_count usage outside mm/ is limited to setting the refcount to 1.
Remove set_page_count from outside mm/, and replace those users with
init_page_count() and set_page_refcounted().
This allows more debug checking, and tighter control on how code is allowed
to play around with page->_count.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/mm')
-rw-r--r-- | arch/x86_64/mm/init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 7af1742aa958..40ed13d263cd 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c | |||
@@ -486,7 +486,7 @@ void __init clear_kernel_mapping(unsigned long address, unsigned long size) | |||
486 | void online_page(struct page *page) | 486 | void online_page(struct page *page) |
487 | { | 487 | { |
488 | ClearPageReserved(page); | 488 | ClearPageReserved(page); |
489 | set_page_count(page, 1); | 489 | init_page_count(page); |
490 | __free_page(page); | 490 | __free_page(page); |
491 | totalram_pages++; | 491 | totalram_pages++; |
492 | num_physpages++; | 492 | num_physpages++; |
@@ -592,7 +592,7 @@ void free_initmem(void) | |||
592 | addr = (unsigned long)(&__init_begin); | 592 | addr = (unsigned long)(&__init_begin); |
593 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 593 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
594 | ClearPageReserved(virt_to_page(addr)); | 594 | ClearPageReserved(virt_to_page(addr)); |
595 | set_page_count(virt_to_page(addr), 1); | 595 | init_page_count(virt_to_page(addr)); |
596 | memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE); | 596 | memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE); |
597 | free_page(addr); | 597 | free_page(addr); |
598 | totalram_pages++; | 598 | totalram_pages++; |
@@ -632,7 +632,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
632 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | 632 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); |
633 | for (; start < end; start += PAGE_SIZE) { | 633 | for (; start < end; start += PAGE_SIZE) { |
634 | ClearPageReserved(virt_to_page(start)); | 634 | ClearPageReserved(virt_to_page(start)); |
635 | set_page_count(virt_to_page(start), 1); | 635 | init_page_count(virt_to_page(start)); |
636 | free_page(start); | 636 | free_page(start); |
637 | totalram_pages++; | 637 | totalram_pages++; |
638 | } | 638 | } |