aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv/mm
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2006-03-22 03:08:40 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 10:54:02 -0500
commit7835e98b2e3c66dba79cb0ff8ebb90a2fe030c29 (patch)
tree405a96eade34845dabe2f125b6c5eb095846869d /arch/frv/mm
parent70dc991d66cac40fdb07346dba2b5d862d732c34 (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/frv/mm')
-rw-r--r--arch/frv/mm/init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c
index 765088ea8a50..8899aa1a4f06 100644
--- a/arch/frv/mm/init.c
+++ b/arch/frv/mm/init.c
@@ -169,7 +169,7 @@ void __init mem_init(void)
169 struct page *page = &mem_map[pfn]; 169 struct page *page = &mem_map[pfn];
170 170
171 ClearPageReserved(page); 171 ClearPageReserved(page);
172 set_page_count(page, 1); 172 init_page_count(page);
173 __free_page(page); 173 __free_page(page);
174 totalram_pages++; 174 totalram_pages++;
175 } 175 }
@@ -210,7 +210,7 @@ void __init free_initmem(void)
210 /* next to check that the page we free is not a partial page */ 210 /* next to check that the page we free is not a partial page */
211 for (addr = start; addr < end; addr += PAGE_SIZE) { 211 for (addr = start; addr < end; addr += PAGE_SIZE) {
212 ClearPageReserved(virt_to_page(addr)); 212 ClearPageReserved(virt_to_page(addr));
213 set_page_count(virt_to_page(addr), 1); 213 init_page_count(virt_to_page(addr));
214 free_page(addr); 214 free_page(addr);
215 totalram_pages++; 215 totalram_pages++;
216 } 216 }
@@ -230,7 +230,7 @@ void __init free_initrd_mem(unsigned long start, unsigned long end)
230 int pages = 0; 230 int pages = 0;
231 for (; start < end; start += PAGE_SIZE) { 231 for (; start < end; start += PAGE_SIZE) {
232 ClearPageReserved(virt_to_page(start)); 232 ClearPageReserved(virt_to_page(start));
233 set_page_count(virt_to_page(start), 1); 233 init_page_count(virt_to_page(start));
234 free_page(start); 234 free_page(start);
235 totalram_pages++; 235 totalram_pages++;
236 pages++; 236 pages++;