[PATCH] remove set_page_count(page, 0) users (outside mm)
authorNick Piggin <npiggin@suse.de>
Wed, 22 Mar 2006 08:08:35 +0000 (00:08 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 22 Mar 2006 15:54:01 +0000 (07:54 -0800)
A couple of places set_page_count(page, 1) that don't need to.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/powerpc/mm/mem.c
arch/um/kernel/physmem.c

index 550517c2dd42babc88c7064763556b5851467dd4..6ae5c130d0db2f10b850ca1c6c100ff1b3f080b6 100644 (file)
@@ -108,8 +108,8 @@ EXPORT_SYMBOL(phys_mem_access_prot);
 void online_page(struct page *page)
 {
        ClearPageReserved(page);
-       set_page_count(page, 0);
-       free_cold_page(page);
+       set_page_count(page, 1);
+       __free_page(page);
        totalram_pages++;
        num_physpages++;
 }
index 544665e04513b33b4106ccd564be392e22d09b8f..0e65340eee33704f141621b46cc2641de0e4f949 100644 (file)
@@ -279,7 +279,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem)
 
        for(i = 0; i < total_pages; i++){
                p = &map[i];
-               set_page_count(p, 0);
+               memset(p, 0, sizeof(struct page));
                SetPageReserved(p);
                INIT_LIST_HEAD(&p->lru);
        }