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/i386/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/i386/mm')
-rw-r--r-- | arch/i386/mm/init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 2700f01994ba..7ba55a6e2dbc 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -270,7 +270,7 @@ static void __init permanent_kmaps_init(pgd_t *pgd_base) | |||
270 | 270 | ||
271 | static void __meminit free_new_highpage(struct page *page) | 271 | static void __meminit free_new_highpage(struct page *page) |
272 | { | 272 | { |
273 | set_page_count(page, 1); | 273 | init_page_count(page); |
274 | __free_page(page); | 274 | __free_page(page); |
275 | totalhigh_pages++; | 275 | totalhigh_pages++; |
276 | } | 276 | } |
@@ -727,7 +727,7 @@ void free_initmem(void) | |||
727 | addr = (unsigned long)(&__init_begin); | 727 | addr = (unsigned long)(&__init_begin); |
728 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 728 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
729 | ClearPageReserved(virt_to_page(addr)); | 729 | ClearPageReserved(virt_to_page(addr)); |
730 | set_page_count(virt_to_page(addr), 1); | 730 | init_page_count(virt_to_page(addr)); |
731 | memset((void *)addr, 0xcc, PAGE_SIZE); | 731 | memset((void *)addr, 0xcc, PAGE_SIZE); |
732 | free_page(addr); | 732 | free_page(addr); |
733 | totalram_pages++; | 733 | totalram_pages++; |
@@ -766,7 +766,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
766 | printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | 766 | printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10); |
767 | for (; start < end; start += PAGE_SIZE) { | 767 | for (; start < end; start += PAGE_SIZE) { |
768 | ClearPageReserved(virt_to_page(start)); | 768 | ClearPageReserved(virt_to_page(start)); |
769 | set_page_count(virt_to_page(start), 1); | 769 | init_page_count(virt_to_page(start)); |
770 | free_page(start); | 770 | free_page(start); |
771 | totalram_pages++; | 771 | totalram_pages++; |
772 | } | 772 | } |