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/mips/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/mips/mm')
-rw-r--r-- | arch/mips/mm/init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index a140da9732db..52f7d59fe612 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -245,7 +245,7 @@ void __init mem_init(void) | |||
245 | #ifdef CONFIG_LIMITED_DMA | 245 | #ifdef CONFIG_LIMITED_DMA |
246 | set_page_address(page, lowmem_page_address(page)); | 246 | set_page_address(page, lowmem_page_address(page)); |
247 | #endif | 247 | #endif |
248 | set_page_count(page, 1); | 248 | init_page_count(page); |
249 | __free_page(page); | 249 | __free_page(page); |
250 | totalhigh_pages++; | 250 | totalhigh_pages++; |
251 | } | 251 | } |
@@ -292,7 +292,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
292 | 292 | ||
293 | for (; start < end; start += PAGE_SIZE) { | 293 | for (; start < end; start += PAGE_SIZE) { |
294 | ClearPageReserved(virt_to_page(start)); | 294 | ClearPageReserved(virt_to_page(start)); |
295 | set_page_count(virt_to_page(start), 1); | 295 | init_page_count(virt_to_page(start)); |
296 | free_page(start); | 296 | free_page(start); |
297 | totalram_pages++; | 297 | totalram_pages++; |
298 | } | 298 | } |
@@ -315,7 +315,7 @@ void free_initmem(void) | |||
315 | page = addr; | 315 | page = addr; |
316 | #endif | 316 | #endif |
317 | ClearPageReserved(virt_to_page(page)); | 317 | ClearPageReserved(virt_to_page(page)); |
318 | set_page_count(virt_to_page(page), 1); | 318 | init_page_count(virt_to_page(page)); |
319 | free_page(page); | 319 | free_page(page); |
320 | totalram_pages++; | 320 | totalram_pages++; |
321 | freed += PAGE_SIZE; | 321 | freed += PAGE_SIZE; |