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/ia64/mm/init.c | |
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/ia64/mm/init.c')
-rw-r--r-- | arch/ia64/mm/init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index b38b6d213c15..08d94e6bfa18 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -197,7 +197,7 @@ free_initmem (void) | |||
197 | eaddr = (unsigned long) ia64_imva(__init_end); | 197 | eaddr = (unsigned long) ia64_imva(__init_end); |
198 | while (addr < eaddr) { | 198 | while (addr < eaddr) { |
199 | ClearPageReserved(virt_to_page(addr)); | 199 | ClearPageReserved(virt_to_page(addr)); |
200 | set_page_count(virt_to_page(addr), 1); | 200 | init_page_count(virt_to_page(addr)); |
201 | free_page(addr); | 201 | free_page(addr); |
202 | ++totalram_pages; | 202 | ++totalram_pages; |
203 | addr += PAGE_SIZE; | 203 | addr += PAGE_SIZE; |
@@ -252,7 +252,7 @@ free_initrd_mem (unsigned long start, unsigned long end) | |||
252 | continue; | 252 | continue; |
253 | page = virt_to_page(start); | 253 | page = virt_to_page(start); |
254 | ClearPageReserved(page); | 254 | ClearPageReserved(page); |
255 | set_page_count(page, 1); | 255 | init_page_count(page); |
256 | free_page(start); | 256 | free_page(start); |
257 | ++totalram_pages; | 257 | ++totalram_pages; |
258 | } | 258 | } |
@@ -640,7 +640,7 @@ mem_init (void) | |||
640 | void online_page(struct page *page) | 640 | void online_page(struct page *page) |
641 | { | 641 | { |
642 | ClearPageReserved(page); | 642 | ClearPageReserved(page); |
643 | set_page_count(page, 1); | 643 | init_page_count(page); |
644 | __free_page(page); | 644 | __free_page(page); |
645 | totalram_pages++; | 645 | totalram_pages++; |
646 | num_physpages++; | 646 | num_physpages++; |